Allowed to provide the domain when creating a short URL

This commit is contained in:
Alejandro Celaya
2019-10-02 20:13:25 +02:00
parent a892f72425
commit f067d0e831
4 changed files with 50 additions and 6 deletions

View File

@@ -40,6 +40,12 @@ class ShortUrlsFixture extends AbstractFixture
))->setShortCode('ghi789');
$manager->persist($withDomainShortUrl);
$withDomainAndSlugShortUrl = $this->setShortUrlDate(new ShortUrl(
'https://google.com',
ShortUrlMeta::createFromRawData(['domain' => 'some-domain.com'])
))->setShortCode('custom-with-domain');
$manager->persist($withDomainAndSlugShortUrl);
$manager->flush();
$this->addReference('abc123_short_url', $abcShortUrl);