mirror of
https://github.com/shlinkio/shlink.git
synced 2026-09-03 19:52:51 -05:00
Created RequestTracker test
This commit is contained in:
@@ -49,55 +49,4 @@ class NotFoundTrackerMiddlewareTest extends TestCase
|
||||
$this->requestTracker->trackNotFoundIfApplicable($this->request)->shouldHaveBeenCalledOnce();
|
||||
$this->handler->handle($this->request)->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
// /** @test */
|
||||
// public function baseUrlErrorIsTracked(): void
|
||||
// {
|
||||
// $isBaseUrl = $this->notFoundType->isBaseUrl()->willReturn(true);
|
||||
// $isRegularNotFound = $this->notFoundType->isRegularNotFound()->willReturn(false);
|
||||
// $isInvalidShortUrl = $this->notFoundType->isInvalidShortUrl()->willReturn(false);
|
||||
//
|
||||
// $this->middleware->process($this->request, $this->handler->reveal());
|
||||
//
|
||||
// $isBaseUrl->shouldHaveBeenCalledOnce();
|
||||
// $isRegularNotFound->shouldNotHaveBeenCalled();
|
||||
// $isInvalidShortUrl->shouldNotHaveBeenCalled();
|
||||
// $this->visitsTracker->trackBaseUrlVisit(Argument::type(Visitor::class))->shouldHaveBeenCalledOnce();
|
||||
// $this->visitsTracker->trackRegularNotFoundVisit(Argument::type(Visitor::class))->shouldNotHaveBeenCalled();
|
||||
// $this->visitsTracker->trackInvalidShortUrlVisit(Argument::type(Visitor::class))->shouldNotHaveBeenCalled();
|
||||
// }
|
||||
//
|
||||
// /** @test */
|
||||
// public function regularNotFoundErrorIsTracked(): void
|
||||
// {
|
||||
// $isBaseUrl = $this->notFoundType->isBaseUrl()->willReturn(false);
|
||||
// $isRegularNotFound = $this->notFoundType->isRegularNotFound()->willReturn(true);
|
||||
// $isInvalidShortUrl = $this->notFoundType->isInvalidShortUrl()->willReturn(false);
|
||||
//
|
||||
// $this->middleware->process($this->request, $this->handler->reveal());
|
||||
//
|
||||
// $isBaseUrl->shouldHaveBeenCalledOnce();
|
||||
// $isRegularNotFound->shouldHaveBeenCalledOnce();
|
||||
// $isInvalidShortUrl->shouldNotHaveBeenCalled();
|
||||
// $this->visitsTracker->trackBaseUrlVisit(Argument::type(Visitor::class))->shouldNotHaveBeenCalled();
|
||||
// $this->visitsTracker->trackRegularNotFoundVisit(Argument::type(Visitor::class))->shouldHaveBeenCalledOnce();
|
||||
// $this->visitsTracker->trackInvalidShortUrlVisit(Argument::type(Visitor::class))->shouldNotHaveBeenCalled();
|
||||
// }
|
||||
//
|
||||
// /** @test */
|
||||
// public function invalidShortUrlErrorIsTracked(): void
|
||||
// {
|
||||
// $isBaseUrl = $this->notFoundType->isBaseUrl()->willReturn(false);
|
||||
// $isRegularNotFound = $this->notFoundType->isRegularNotFound()->willReturn(false);
|
||||
// $isInvalidShortUrl = $this->notFoundType->isInvalidShortUrl()->willReturn(true);
|
||||
//
|
||||
// $this->middleware->process($this->request, $this->handler->reveal());
|
||||
//
|
||||
// $isBaseUrl->shouldHaveBeenCalledOnce();
|
||||
// $isRegularNotFound->shouldHaveBeenCalledOnce();
|
||||
// $isInvalidShortUrl->shouldHaveBeenCalledOnce();
|
||||
// $this->visitsTracker->trackBaseUrlVisit(Argument::type(Visitor::class))->shouldNotHaveBeenCalled();
|
||||
// $this->visitsTracker->trackRegularNotFoundVisit(Argument::type(Visitor::class))->shouldNotHaveBeenCalled();
|
||||
// $this->visitsTracker->trackInvalidShortUrlVisit(Argument::type(Visitor::class))->shouldHaveBeenCalledOnce();
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user