mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-22 15:13:59 -06:00
Covered detached domains with redirects in domains list API test
This commit is contained in:
parent
8f3c740b57
commit
8b75ad1e7f
@ -32,6 +32,10 @@ class ListDomainsTest extends ApiTestCase
|
||||
'domain' => 'doma.in',
|
||||
'isDefault' => true,
|
||||
],
|
||||
[
|
||||
'domain' => 'detached-with-redirects.com',
|
||||
'isDefault' => false,
|
||||
],
|
||||
[
|
||||
'domain' => 'example.com',
|
||||
'isDefault' => false,
|
||||
|
@ -6,6 +6,7 @@ namespace ShlinkioApiTest\Shlink\Rest\Fixtures;
|
||||
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use Shlinkio\Shlink\Core\Config\NotFoundRedirects;
|
||||
use Shlinkio\Shlink\Core\Entity\Domain;
|
||||
|
||||
class DomainFixture extends AbstractFixture
|
||||
@ -17,6 +18,11 @@ class DomainFixture extends AbstractFixture
|
||||
$this->addReference('example_domain', $domain);
|
||||
|
||||
$manager->persist(Domain::withAuthority('this_domain_is_detached.com'));
|
||||
|
||||
$detachedWithRedirects = Domain::withAuthority('detached-with-redirects.com');
|
||||
$detachedWithRedirects->configureNotFoundRedirects(new NotFoundRedirects('foo.com', 'bar.com'));
|
||||
$manager->persist($detachedWithRedirects);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user