diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-26 11:24:40 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-28 10:14:47 +0200 |
commit | 82cee42b602d66b788b4203b740ebad16d329e2a (patch) | |
tree | d7ce2c2804d85929e7a6e4209e9f28fd584e4f4c | |
parent | f5c1ae2dd8ec0b1aabdefb78815163c1223aacba (diff) | |
download | wallabag-sort-entries.tar.gz wallabag-sort-entries.tar.zst wallabag-sort-entries.zip |
Fixed tests againsort-entries
-rw-r--r-- | src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php | 4 | ||||
-rw-r--r-- | 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 | |||
75 | 'created_at' => '2020-04-26 10:04:00', | 75 | 'created_at' => '2020-04-26 10:04:00', |
76 | 'language' => 'fr', | 76 | 'language' => 'fr', |
77 | 'starred' => true, | 77 | 'starred' => true, |
78 | 'starred_at' => '2042-04-26 10:04:00', | ||
78 | 'preview' => 'http://0.0.0.0/image.jpg', | 79 | 'preview' => 'http://0.0.0.0/image.jpg', |
79 | ], | 80 | ], |
80 | 'entry6' => [ | 81 | 'entry6' => [ |
@@ -88,6 +89,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface | |||
88 | 'created_at' => '2020-04-26 10:05:00', | 89 | 'created_at' => '2020-04-26 10:05:00', |
89 | 'language' => 'de', | 90 | 'language' => 'de', |
90 | 'archived' => true, | 91 | 'archived' => true, |
92 | 'archived_at' => '2020-04-26 10:05:00', | ||
91 | 'tags' => ['bar-tag'], | 93 | 'tags' => ['bar-tag'], |
92 | ], | 94 | ], |
93 | ]; | 95 | ]; |
@@ -115,10 +117,12 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface | |||
115 | 117 | ||
116 | if (isset($item['starred'])) { | 118 | if (isset($item['starred'])) { |
117 | $entry->setStarred($item['starred']); | 119 | $entry->setStarred($item['starred']); |
120 | $entry->setStarredAt(new \DateTime($item['starred_at'])); | ||
118 | } | 121 | } |
119 | 122 | ||
120 | if (isset($item['archived'])) { | 123 | if (isset($item['archived'])) { |
121 | $entry->setArchived($item['archived']); | 124 | $entry->setArchived($item['archived']); |
125 | $entry->setArchivedAt(new \DateTime($item['archived_at'])); | ||
122 | } | 126 | } |
123 | 127 | ||
124 | if (isset($item['preview'])) { | 128 | 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 | |||
1164 | 1164 | ||
1165 | $results = array_values(array_unique($matches[0])); | 1165 | $results = array_values(array_unique($matches[0])); |
1166 | 1166 | ||
1167 | $ids = [5, 8, 7, 9]; | 1167 | $ids = [8, 7, 9, 5]; |
1168 | 1168 | ||
1169 | foreach ($results as $key => $result) { | 1169 | foreach ($results as $key => $result) { |
1170 | $this->assertSame('test title entry' . $ids[$key], $result); | 1170 | $this->assertSame('test title entry' . $ids[$key], $result); |
@@ -1230,7 +1230,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
1230 | 1230 | ||
1231 | $results = array_values(array_unique($matches[0])); | 1231 | $results = array_values(array_unique($matches[0])); |
1232 | 1232 | ||
1233 | $ids = [6, 8, 7, 9]; | 1233 | $ids = [8, 7, 9, 6]; |
1234 | 1234 | ||
1235 | foreach ($results as $key => $result) { | 1235 | foreach ($results as $key => $result) { |
1236 | $this->assertSame('test title entry' . $ids[$key], $result); | 1236 | $this->assertSame('test title entry' . $ids[$key], $result); |