aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-08 23:05:51 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-02-08 23:13:40 +0100
commit3b815d2de5a852fe2ebad5827bd4c9070aa175ea (patch)
tree504e54ecfd8ae6203f76a19a910e5e6c5dee1c3e /src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php
parentd91691573f108422cc2080462af35ebd62dc93fb (diff)
downloadwallabag-3b815d2de5a852fe2ebad5827bd4c9070aa175ea.tar.gz
wallabag-3b815d2de5a852fe2ebad5827bd4c9070aa175ea.tar.zst
wallabag-3b815d2de5a852fe2ebad5827bd4c9070aa175ea.zip
Add some fixtures
Improve test, so user can login Fix some leftJoin Cleanup EntryController
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php
new file mode 100644
index 00000000..da788218
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php
@@ -0,0 +1,34 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures\ORM;
4
5use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\User;
9
10class LoadUserData extends AbstractFixture implements OrderedFixtureInterface
11{
12 /**
13 * {@inheritDoc}
14 */
15 public function load(ObjectManager $manager)
16 {
17 $userAdmin = new User();
18 $userAdmin->setUsername('admin');
19 $userAdmin->setPassword('test');
20
21 $manager->persist($userAdmin);
22 $manager->flush();
23
24 $this->addReference('admin-user', $userAdmin);
25 }
26
27 /**
28 * {@inheritDoc}
29 */
30 public function getOrder()
31 {
32 return 10;
33 }
34}