2020-11-21 10:44:28 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace ShlinkioApiTest\Shlink\Rest\Fixtures;
|
|
|
|
|
|
|
|
use Doctrine\Common\DataFixtures\AbstractFixture;
|
|
|
|
use Doctrine\Persistence\ObjectManager;
|
|
|
|
use Shlinkio\Shlink\Core\Entity\Domain;
|
|
|
|
|
|
|
|
class DomainFixture extends AbstractFixture
|
|
|
|
{
|
|
|
|
public function load(ObjectManager $manager): void
|
|
|
|
{
|
2021-01-10 10:40:18 +03:00
|
|
|
$domain = new Domain('example.com');
|
|
|
|
$manager->persist($domain);
|
|
|
|
$this->addReference('example_domain', $domain);
|
|
|
|
|
|
|
|
$manager->persist(new Domain('this_domain_is_detached.com'));
|
2020-11-21 10:44:28 +03:00
|
|
|
$manager->flush();
|
|
|
|
}
|
|
|
|
}
|