Project

General

Profile

Actions

Bug #94135

closed

Typo3DbQueryParserTest fail with wrong timestamp when php timezone is not UTC

Added by Benjamin Franzke almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Category:
Tests
Target version:
Start date:
2021-05-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

My php timezone is Europe/Berlin and unit tests error in this case:

./bin/phpunit -d memory_limit=1G -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php

1) TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Storage\Typo3DbQueryParserTest::visibilityConstraintStatementIsGeneratedAccordingToTheQuerySettings with data set "in fe: respect enable fields and do not include deleted" ('FE', false, array(), false, '(tx_foo_table.deleted_column ...79200)')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'(tx_foo_table.deleted_column = 0) AND (tx_foo_table.disabled_column = 0) AND (tx_foo_table.starttime_column <= 1451779200)'
+'(tx_foo_table.deleted_column = 0) AND (tx_foo_table.disabled_column = 0) AND (tx_foo_table.starttime_column <= 1451775600)'

/home/ben/src/TYPO310.CMS/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php:607
/home/ben/src/TYPO310.CMS/vendor/phpunit/phpunit/phpunit:61

2) TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Storage\Typo3DbQueryParserTest::respectEnableFieldsSettingGeneratesCorrectStatement with data set "in FE: respectEnableFields=true" ('FE', true, '(tx_foo_table.deleted_column ...79200)')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'(tx_foo_table.deleted_column = 0) AND (tx_foo_table.disabled_column = 0) AND (tx_foo_table.starttime_column <= 1451779200)'
+'(tx_foo_table.deleted_column = 0) AND (tx_foo_table.disabled_column = 0) AND (tx_foo_table.starttime_column <= 1451775600)'

/home/ben/src/TYPO310.CMS/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php:672
/home/ben/src/TYPO310.CMS/vendor/phpunit/phpunit/phpunit:61

Actions

Also available in: Atom PDF