Ensured domain is taken into account when looking for a short URL

This commit is contained in:
Alejandro Celaya
2019-10-04 17:21:22 +02:00
parent 2ffaabe594
commit 49c3c9bec1
5 changed files with 19 additions and 9 deletions

View File

@@ -247,7 +247,7 @@ class UrlShortenerTest extends TestCase
$shortUrl->setShortCode($shortCode);
$repo = $this->prophesize(ShortUrlRepositoryInterface::class);
$repo->findOneByShortCode($shortCode)->willReturn($shortUrl);
$repo->findOneByShortCode($shortCode, null)->willReturn($shortUrl);
$this->em->getRepository(ShortUrl::class)->willReturn($repo->reveal());
$url = $this->urlShortener->shortCodeToUrl($shortCode);