mirror of
https://github.com/wallabag/wallabag.git
synced 2024-10-31 22:28:54 +00:00
Fix failing randomly test
This commit is contained in:
parent
90631abe46
commit
5fe5551972
1 changed files with 8 additions and 4 deletions
|
@ -237,14 +237,18 @@ class FeedControllerTest extends WallabagCoreTestCase
|
||||||
$entry1->setCreatedAt($day1);
|
$entry1->setCreatedAt($day1);
|
||||||
$entry4->setCreatedAt($day2);
|
$entry4->setCreatedAt($day2);
|
||||||
|
|
||||||
$property = (new \ReflectionObject($entry1))->getProperty('updatedAt');
|
|
||||||
$property->setAccessible(true);
|
|
||||||
$property->setValue($entry1, $day4);
|
|
||||||
|
|
||||||
$property = (new \ReflectionObject($entry4))->getProperty('updatedAt');
|
$property = (new \ReflectionObject($entry4))->getProperty('updatedAt');
|
||||||
$property->setAccessible(true);
|
$property->setAccessible(true);
|
||||||
$property->setValue($entry4, $day3);
|
$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();
|
$em->flush();
|
||||||
|
|
||||||
$client = $this->getTestClient();
|
$client = $this->getTestClient();
|
||||||
|
|
Loading…
Reference in a new issue