Improved public API in ShortUrl entity, reducing anemic model

This commit is contained in:
Alejandro Celaya
2018-10-28 16:00:54 +01:00
parent 877b098b09
commit 8e1e8ba7de
26 changed files with 96 additions and 148 deletions

View File

@@ -84,7 +84,7 @@ class QrCodeActionTest extends TestCase
public function aCorrectRequestReturnsTheQrCodeResponse()
{
$shortCode = 'abc123';
$this->urlShortener->shortCodeToUrl($shortCode)->willReturn((new ShortUrl())->setLongUrl(''))
$this->urlShortener->shortCodeToUrl($shortCode)->willReturn(new ShortUrl(''))
->shouldBeCalledTimes(1);
$delegate = $this->prophesize(RequestHandlerInterface::class);