aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-05-30 14:18:47 +0200
committerThomas Citharel <tcit@tcit.fr>2016-06-23 09:15:50 +0200
commitf06f840c9d5e08b81d56e0588dee8249bd2f19af (patch)
treedb0f648866591df9bda0e60982d37d8ede8bc380 /src/Wallabag/CoreBundle/DataFixtures
parentaf95c09c800e8aa8ef4af053f35d506136ecd685 (diff)
downloadwallabag-f06f840c9d5e08b81d56e0588dee8249bd2f19af.tar.gz
wallabag-f06f840c9d5e08b81d56e0588dee8249bd2f19af.tar.zst
wallabag-f06f840c9d5e08b81d56e0588dee8249bd2f19af.zip
Move fixtures to the right place
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php6
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
index 5a376453..ebfebfea 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
@@ -16,12 +16,6 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
16 public function load(ObjectManager $manager) 16 public function load(ObjectManager $manager)
17 { 17 {
18 $adminConfig = new Config($this->getReference('admin-user')); 18 $adminConfig = new Config($this->getReference('admin-user'));
19 $taggingRule = new TaggingRule();
20
21 $taggingRule->setConfig($adminConfig);
22 $taggingRule->setRule('title matches "wallabag"');
23 $taggingRule->setTags(['wallabag']);
24 $manager->persist($taggingRule);
25 19
26 $adminConfig->setTheme('material'); 20 $adminConfig->setTheme('material');
27 $adminConfig->setItemsPerPage(30); 21 $adminConfig->setItemsPerPage(30);
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php
index 2e1cc270..7efe6356 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php
@@ -28,6 +28,14 @@ class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInter
28 28
29 $manager->persist($tr2); 29 $manager->persist($tr2);
30 30
31 $tr3 = new TaggingRule();
32
33 $tr3->setRule('title matches "wallabag"');
34 $tr3->setTags(['wallabag']);
35 $tr3->setConfig($this->getReference('admin-config'));
36
37 $manager->persist($tr3);
38
31 $manager->flush(); 39 $manager->flush();
32 } 40 }
33 41