Migrated NotFoundRedirectHandlerTest to use PHPUnit mocks

This commit is contained in:
Alejandro Celaya
2022-10-21 19:24:39 +02:00
parent a8514a9ae4
commit 230e56370a
3 changed files with 61 additions and 62 deletions

View File

@@ -42,7 +42,7 @@ class QrCodeActionTest extends TestCase
{
$shortCode = 'abc123';
$this->urlResolver->expects($this->once())->method('resolveEnabledShortUrl')->with(
$this->equalTo(ShortUrlIdentifier::fromShortCodeAndDomain($shortCode, ''))
$this->equalTo(ShortUrlIdentifier::fromShortCodeAndDomain($shortCode, '')),
)->willThrowException(ShortUrlNotFoundException::fromNotFound(ShortUrlIdentifier::fromShortCodeAndDomain('')));
$delegate = $this->createMock(RequestHandlerInterface::class);
$delegate->expects($this->once())->method('handle')->withAnyParameters()->willReturn(new Response());