From: Nicolas LÅ“uillet Date: Sun, 26 Apr 2020 09:24:40 +0000 (+0200) Subject: Fixed tests again X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=82cee42b602d66b788b4203b740ebad16d329e2a;p=github%2Fwallabag%2Fwallabag.git Fixed tests again --- diff --git a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php index 759845ac..a4844442 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php @@ -75,6 +75,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'created_at' => '2020-04-26 10:04:00', 'language' => 'fr', 'starred' => true, + 'starred_at' => '2042-04-26 10:04:00', 'preview' => 'http://0.0.0.0/image.jpg', ], 'entry6' => [ @@ -88,6 +89,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'created_at' => '2020-04-26 10:05:00', 'language' => 'de', 'archived' => true, + 'archived_at' => '2020-04-26 10:05:00', 'tags' => ['bar-tag'], ], ]; @@ -115,10 +117,12 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface if (isset($item['starred'])) { $entry->setStarred($item['starred']); + $entry->setStarredAt(new \DateTime($item['starred_at'])); } if (isset($item['archived'])) { $entry->setArchived($item['archived']); + $entry->setArchivedAt(new \DateTime($item['archived_at'])); } if (isset($item['preview'])) { diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 765c108e..502ab5f9 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -1164,7 +1164,7 @@ class EntryControllerTest extends WallabagCoreTestCase $results = array_values(array_unique($matches[0])); - $ids = [5, 8, 7, 9]; + $ids = [8, 7, 9, 5]; foreach ($results as $key => $result) { $this->assertSame('test title entry' . $ids[$key], $result); @@ -1230,7 +1230,7 @@ class EntryControllerTest extends WallabagCoreTestCase $results = array_values(array_unique($matches[0])); - $ids = [6, 8, 7, 9]; + $ids = [8, 7, 9, 6]; foreach ($results as $key => $result) { $this->assertSame('test title entry' . $ids[$key], $result);