Added API test which checks short URLs with a domain are parsed as such

This commit is contained in:
Alejandro Celaya
2019-10-01 20:24:11 +02:00
parent d0bb86ca8f
commit 8da6b336f5
2 changed files with 26 additions and 2 deletions

View File

@@ -34,6 +34,12 @@ class ShortUrlsFixture extends AbstractFixture
));
$manager->persist($customShortUrl);
$withDomainShortUrl = $this->setShortUrlDate(new ShortUrl(
'https://blog.alejandrocelaya.com/2019/04/27/considerations-to-properly-use-open-source-software-projects/',
ShortUrlMeta::createFromRawData(['domain' => 'example.com'])
))->setShortCode('ghi789');
$manager->persist($withDomainShortUrl);
$manager->flush();
$this->addReference('abc123_short_url', $abcShortUrl);