X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FDataFixtures%2FEntryFixtures.php;h=a48444428106fd6528d65e1ae86e47d4c55f0078;hb=82cee42b602d66b788b4203b740ebad16d329e2a;hp=024fcfdc8d75edcf5a26837b576b2cd54c291335;hpb=73ec68b1ffafb792265a3805833e5cd84c966aed;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php index 024fcfdc..a4844442 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php @@ -24,6 +24,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'mime' => 'text/html', 'title' => 'test title entry1', 'content' => 'This is my content /o/', + 'created_at' => '2020-04-26 10:00:00', 'language' => 'en', 'tags' => ['foo-tag', 'baz-tag'], ], @@ -35,6 +36,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'mime' => 'text/html', 'title' => 'test title entry2', 'content' => 'This is my content /o/', + 'created_at' => '2020-04-26 10:01:00', 'origin' => 'ftp://oneftp.tld', 'language' => 'fr', ], @@ -46,6 +48,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'mime' => 'text/html', 'title' => 'test title entry3', 'content' => 'This is my content /o/', + 'created_at' => '2020-04-26 10:02:00', 'language' => 'en', 'tags' => ['foo-tag', 'bar-tag', 'bob-tag'], ], @@ -57,6 +60,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'mime' => 'text/html', 'title' => 'test title entry4', 'content' => 'This is my content /o/', + 'created_at' => '2020-04-26 10:03:00', 'language' => 'en', 'tags' => ['foo-tag', 'bar-tag'], ], @@ -68,8 +72,10 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'mime' => 'text/html', 'title' => 'test title entry5', 'content' => 'This is my content /o/', + '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' => [ @@ -80,8 +86,10 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface 'mime' => 'text/html', 'title' => 'test title entry6', 'content' => 'This is my content /o/', + 'created_at' => '2020-04-26 10:05:00', 'language' => 'de', 'archived' => true, + 'archived_at' => '2020-04-26 10:05:00', 'tags' => ['bar-tag'], ], ]; @@ -94,6 +102,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface $entry->setMimetype($item['mime']); $entry->setTitle($item['title']); $entry->setContent($item['content']); + $entry->setCreatedAt(new \DateTime($item['created_at'])); $entry->setLanguage($item['language']); if (isset($item['tags'])) { @@ -108,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'])) {