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 #1

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69141

Actions #2

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69124

Actions #3

Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69124

Actions #4

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69125

Actions #5

Updated by Benjamin Franzke almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF