mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Removed all uinnecessary usages of equalsTo param constraint
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user