Skip to content

Commit

Permalink
[TASK] Log with new page field
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala committed Jan 10, 2025
1 parent e4550b3 commit af643ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Classes/Domain/Form/Finishers/LoggerFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ protected function executeInternal()
}

$data = [
'pid' => $this->getTypoScriptFrontendController()->id,
'crdate' => $now,
'tstamp' => $now,
'page' => $this->getTypoScriptFrontendController()->id,
'language' => (int)$context->getPropertyFromAspect('language', 'id', 0),
'identifier' => $formDefinition->getIdentifier(),
'data' => $encodedFormValues,
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Domain/Form/Finishers/LoggerFinisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function logsSubmittedFormData(array $fields, array $formValues, string $
->select(['*'], 'tx_formlog_entries')
->fetchAssociative();

self::assertSame(123, $logEntry['pid'] ?? null);
self::assertSame(123, $logEntry['page'] ?? null);
self::assertSame($formDefinition->getIdentifier(), $logEntry['identifier'] ?? null);
self::assertSame($expectedData, $logEntry['data'] ?? null);
self::assertSame('[]', $logEntry['finisher_variables'] ?? null);
Expand Down Expand Up @@ -232,7 +232,7 @@ public function logsFinisherVariables()
->select(['*'], 'tx_formlog_entries')
->fetchAssociative();

self::assertSame(123, $logEntry['pid'] ?? null);
self::assertSame(123, $logEntry['page'] ?? null);
self::assertSame($formDefinition->getIdentifier(), $logEntry['identifier'] ?? null);
self::assertSame('{"name":"Tester"}', $logEntry['data'] ?? null);
self::assertSame('{"SaveToDatabase":{"insertedUids.0":124}}', $logEntry['finisher_variables'] ?? null);
Expand Down

0 comments on commit af643ea

Please sign in to comment.