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

@@ -50,7 +50,7 @@ class PixelActionTest extends TestCase
{
$shortCode = 'abc123';
$this->urlShortener->shortCodeToUrl($shortCode)->willReturn(
(new ShortUrl())->setLongUrl('http://domain.com/foo/bar')
new ShortUrl('http://domain.com/foo/bar')
)->shouldBeCalledTimes(1);
$this->visitTracker->track(Argument::cetera())->shouldBeCalledTimes(1);