From 82cee42b602d66b788b4203b740ebad16d329e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 26 Apr 2020 11:24:40 +0200 Subject: Fixed tests again --- src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php | 4 ++++ tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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); -- cgit v1.2.3