Merge pull request #6763 from wallabag/fix-ci

Fix failing randomly test
This commit is contained in:
Nicolas Lœuillet 2023-07-27 09:02:07 +02:00 committed by GitHub
commit 911e0238b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,14 +237,18 @@ class FeedControllerTest extends WallabagCoreTestCase
$entry1->setCreatedAt($day1);
$entry4->setCreatedAt($day2);
$property = (new \ReflectionObject($entry1))->getProperty('updatedAt');
$property->setAccessible(true);
$property->setValue($entry1, $day4);
$property = (new \ReflectionObject($entry4))->getProperty('updatedAt');
$property->setAccessible(true);
$property->setValue($entry4, $day3);
// We have to flush and sleep here to be sure that $entry1 and $entry4 have different updatedAt values
$em->flush();
sleep(2);
$property = (new \ReflectionObject($entry1))->getProperty('updatedAt');
$property->setAccessible(true);
$property->setValue($entry1, $day4);
$em->flush();
$client = $this->getTestClient();