mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Updated to readonly public props on as many models as possible
This commit is contained in:
@@ -36,9 +36,11 @@ class ResolveShortUrlActionTest extends TestCase
|
||||
{
|
||||
$shortCode = 'abc123';
|
||||
$apiKey = ApiKey::create();
|
||||
$this->urlResolver->resolveShortUrl(new ShortUrlIdentifier($shortCode), $apiKey)->willReturn(
|
||||
ShortUrl::withLongUrl('http://domain.com/foo/bar'),
|
||||
)->shouldBeCalledOnce();
|
||||
$this->urlResolver->resolveShortUrl(
|
||||
ShortUrlIdentifier::fromShortCodeAndDomain($shortCode),
|
||||
$apiKey,
|
||||
)->willReturn(ShortUrl::withLongUrl('http://domain.com/foo/bar'))
|
||||
->shouldBeCalledOnce();
|
||||
|
||||
$request = (new ServerRequest())->withAttribute('shortCode', $shortCode)->withAttribute(ApiKey::class, $apiKey);
|
||||
$response = $this->action->handle($request);
|
||||
|
||||
Reference in New Issue
Block a user