aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-11-26 20:00:01 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-11-28 22:04:54 +0100
commitdb9b6d8d0d9f943fe321ea690701662dac828e94 (patch)
tree165dae22924a69a087f01434d131b5e389b10535 /src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php
parent9394e8098a92c849d15c43dcd0c338887bff68ce (diff)
downloadwallabag-db9b6d8d0d9f943fe321ea690701662dac828e94.tar.gz
wallabag-db9b6d8d0d9f943fe321ea690701662dac828e94.tar.zst
wallabag-db9b6d8d0d9f943fe321ea690701662dac828e94.zip
Update fixtures
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php
new file mode 100644
index 00000000..c73173e8
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php
@@ -0,0 +1,37 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures;
4
5use Doctrine\Bundle\FixturesBundle\Fixture;
6use Doctrine\Common\DataFixtures\DependentFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\SiteCredential;
9use Wallabag\UserBundle\DataFixtures\UserFixtures;
10
11class SiteCredentialFixtures extends Fixture implements DependentFixtureInterface
12{
13 /**
14 * {@inheritdoc}
15 */
16 public function load(ObjectManager $manager)
17 {
18 $credential = new SiteCredential($this->getReference('admin-user'));
19 $credential->setHost('example.com');
20 $credential->setUsername('foo');
21 $credential->setPassword('bar');
22
23 $manager->persist($credential);
24
25 $manager->flush();
26 }
27
28 /**
29 * {@inheritdoc}
30 */
31 public function getDependencies()
32 {
33 return [
34 UserFixtures::class,
35 ];
36 }
37}