]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fixed tests again sort-entries 2179/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 26 Apr 2020 09:24:40 +0000 (11:24 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 28 Apr 2020 08:14:47 +0000 (10:14 +0200)
src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php

index 759845ac3280c0960cebd0847a41c7c386b89a18..a48444428106fd6528d65e1ae86e47d4c55f0078 100644 (file)
@@ -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'])) {
index 765c108e9ad4512d61168d86027c796734a1609f..502ab5f91d2d55e2f78d41d96711215018e51667 100644 (file)
@@ -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);