Removed all uinnecessary usages of equalsTo param constraint

This commit is contained in:
Alejandro Celaya
2022-10-23 18:15:57 +02:00
parent 1fbcea7a06
commit 6a2227efc5
43 changed files with 272 additions and 423 deletions

View File

@@ -38,7 +38,7 @@ class ResolveUrlCommandTest extends TestCase
$expectedUrl = 'http://domain.com/foo/bar';
$shortUrl = ShortUrl::withLongUrl($expectedUrl);
$this->urlResolver->expects($this->once())->method('resolveShortUrl')->with(
$this->equalTo(ShortUrlIdentifier::fromShortCodeAndDomain($shortCode)),
ShortUrlIdentifier::fromShortCodeAndDomain($shortCode),
)->willReturn($shortUrl);
$this->commandTester->execute(['shortCode' => $shortCode]);
@@ -52,9 +52,9 @@ class ResolveUrlCommandTest extends TestCase
$identifier = ShortUrlIdentifier::fromShortCodeAndDomain('abc123');
$shortCode = $identifier->shortCode;
$this->urlResolver->expects($this->once())->method('resolveShortUrl')->with(
$this->equalTo($identifier),
)->willThrowException(ShortUrlNotFoundException::fromNotFound($identifier));
$this->urlResolver->expects($this->once())->method('resolveShortUrl')->with($identifier)->willThrowException(
ShortUrlNotFoundException::fromNotFound($identifier),
);
$this->commandTester->execute(['shortCode' => $shortCode]);
$output = $this->commandTester->getDisplay();