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

@@ -51,9 +51,7 @@ class NotFoundRedirectHandlerTest extends TestCase
$expectedResp = new Response();
$setUp($this->domainService, $this->resolver);
$this->next->expects($this->once())->method('handle')->with($this->equalTo($this->req))->willReturn(
$expectedResp,
);
$this->next->expects($this->once())->method('handle')->with($this->req)->willReturn($expectedResp);
$result = $this->middleware->process($this->req, $this->next);
@@ -105,7 +103,7 @@ class NotFoundRedirectHandlerTest extends TestCase
$this->domainService->expects($this->once())->method('findByAuthority')->withAnyParameters()->willReturn(null);
$this->resolver->expects($this->once())->method('resolveRedirectResponse')->with(
$this->isInstanceOf(NotFoundType::class),
$this->equalTo($this->redirectOptions),
$this->redirectOptions,
$this->isInstanceOf(UriInterface::class),
)->willReturn($expectedResp);
$this->next->expects($this->never())->method('handle');
@@ -126,7 +124,7 @@ class NotFoundRedirectHandlerTest extends TestCase
);
$this->resolver->expects($this->once())->method('resolveRedirectResponse')->with(
$this->isInstanceOf(NotFoundType::class),
$this->equalTo($domain),
$domain,
$this->isInstanceOf(UriInterface::class),
)->willReturn($expectedResp);
$this->next->expects($this->never())->method('handle');

View File

@@ -35,10 +35,8 @@ class NotFoundTrackerMiddlewareTest extends TestCase
/** @test */
public function delegatesIntoRequestTracker(): void
{
$this->handler->expects($this->once())->method('handle')->with($this->equalTo($this->request));
$this->requestTracker->expects($this->once())->method('trackNotFoundIfApplicable')->with(
$this->equalTo($this->request),
);
$this->handler->expects($this->once())->method('handle')->with($this->request);
$this->requestTracker->expects($this->once())->method('trackNotFoundIfApplicable')->with($this->request);
$this->middleware->process($this->request, $this->handler);
}