You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #45859 [HttpKernel] Fix timezone influenced tests (GromNaN)
This PR was merged into the 6.1 branch.
Discussion
----------
[HttpKernel] Fix timezone influenced tests
| Q | A
| ------------- | ---
| Branch? | 6.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #45589 (comment)
| License | MIT
| Doc PR | -
`DateTimeValueResolverTest` fails depending on the default timezone and the current time.
The culprit is the combinaison of `strtotime` + `new DateTime`.
https://github.com/symfony/symfony/blob/24304ad77874f03f9971fd9e29c0ef0776b0f5b9/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php#L67-L69
```
There were 3 failures:
1) Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DateTimeValueResolverTest::testFullDate
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2012-07-21'
+'2012-07-20'
/home/runner/work/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php:53
2) Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DateTimeValueResolverTest::testCustomClass
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2016-09-08'
+'2016-09-07'
/home/runner/work/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php:100
3) Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DateTimeValueResolverTest::testDateTimeImmutable
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2016-09-08'
+'2016-09-07'
/home/runner/work/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php:116
```
Commits
-------
9a0e99c Fix timezone influenced tests
0 commit comments