diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php')
-rw-r--r-- | src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php index 3be323ed..edab9adc 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,6 +38,14 @@ 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(); | ||
42 | $tag1->setLabel("foo"); | ||
43 | $tag2 = new Tag(); | ||
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); |