Closed (fixed)
Project:
Datetime testing
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
3 Jun 2021 at 23:44 UTC
Updated:
13 Jul 2021 at 09:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
sinn commenteddatetime_testing tests failed in PHPUnit 9 (that is used in Drupal 9) because time is printed differently because of PHPUnit\Framework\Assert::assertEquals() function parameters have been changed in this version.
PHPUnit <=8 : https://github.com/sebastianbergmann/phpunit/blob/8.5.15/src/Framework/Assert.php#L601
public static function assertEquals($expected, $actual, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): voidPHPUnit 9 https://github.com/sebastianbergmann/phpunit/blob/9.5/src/Framework/Asse...
public static function assertEquals($expected, $actual, string $message = ''): voidInstead of assertEquals() function assertEqualsWithDelta() should be used, but it appeared in PHPUnit 7.5.0. So I would suggest to set it as minimum version in require-dev in composer and replace assertEquals() by assertEqualsWithDelta().
Also in the tests please fix:
Comment #4
sinn commentedLet's try patch
Comment #5
ademarco commentedI've merged the MR. Closing.