diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-03-06 21:48:33 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-03-06 21:48:33 +0100 |
commit | f37d1427a1b75f9d7a2e273b2e9fb0e895a769ab (patch) | |
tree | e6ea5fb4786e843b970b14d5a96da8c32548a315 /src/Wallabag/CoreBundle/DataFixtures | |
parent | 73b774438395d0ed74d0fd863194d2ebfb68d9ce (diff) | |
parent | 6e22bd737b2e543c85487864a9a25b0f2d5cc3f2 (diff) | |
download | wallabag-f37d1427a1b75f9d7a2e273b2e9fb0e895a769ab.tar.gz wallabag-f37d1427a1b75f9d7a2e273b2e9fb0e895a769ab.tar.zst wallabag-f37d1427a1b75f9d7a2e273b2e9fb0e895a769ab.zip |
Merge pull request #1110 from wallabag/v2-api-hypermedia
[WIP] API : hypermedia & tags
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures')
-rw-r--r-- | src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php index 3be323ed..ce12ec5d 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php | |||
@@ -6,6 +6,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; | |||
6 | use Doctrine\Common\DataFixtures\OrderedFixtureInterface; | 6 | use Doctrine\Common\DataFixtures\OrderedFixtureInterface; |
7 | use Doctrine\Common\Persistence\ObjectManager; | 7 | use Doctrine\Common\Persistence\ObjectManager; |
8 | use Wallabag\CoreBundle\Entity\Entry; | 8 | use Wallabag\CoreBundle\Entity\Entry; |
9 | use Wallabag\CoreBundle\Entity\Tag; | ||
9 | 10 | ||
10 | class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | 11 | class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface |
11 | { | 12 | { |
@@ -37,10 +38,35 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | |||
37 | $entry3->setTitle('test title entry3'); | 38 | $entry3->setTitle('test title entry3'); |
38 | $entry3->setContent('This is my content /o/'); | 39 | $entry3->setContent('This is my content /o/'); |
39 | 40 | ||
41 | $tag1 = new Tag($this->getReference('bob-user')); | ||
42 | $tag1->setLabel("foo"); | ||
43 | $tag2 = new Tag($this->getReference('bob-user')); | ||
44 | $tag2->setLabel("bar"); | ||
45 | |||
46 | $entry3->addTag($tag1); | ||
47 | $entry3->addTag($tag2); | ||
48 | |||
40 | $manager->persist($entry3); | 49 | $manager->persist($entry3); |
41 | 50 | ||
42 | $this->addReference('entry3', $entry3); | 51 | $this->addReference('entry3', $entry3); |
43 | 52 | ||
53 | $entry4 = new Entry($this->getReference('admin-user')); | ||
54 | $entry4->setUrl('http://0.0.0.0'); | ||
55 | $entry4->setTitle('test title entry4'); | ||
56 | $entry4->setContent('This is my content /o/'); | ||
57 | |||
58 | $tag1 = new Tag($this->getReference('admin-user')); | ||
59 | $tag1->setLabel("foo"); | ||
60 | $tag2 = new Tag($this->getReference('admin-user')); | ||
61 | $tag2->setLabel("bar"); | ||
62 | |||
63 | $entry4->addTag($tag1); | ||
64 | $entry4->addTag($tag2); | ||
65 | |||
66 | $manager->persist($entry4); | ||
67 | |||
68 | $this->addReference('entry4', $entry4); | ||
69 | |||
44 | $manager->flush(); | 70 | $manager->flush(); |
45 | } | 71 | } |
46 | 72 | ||