mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-23 21:27:44 +03:00
Fixed unit tests
This commit is contained in:
parent
cd6f067fe5
commit
f784ee5b28
2 changed files with 10 additions and 9 deletions
|
@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
|||
|
||||
* [#507](https://github.com/shlinkio/shlink/issues/507) Fixed error with too long original URLs by increasing size to the maximum value (2048) based on [the standard](https://stackoverflow.com/a/417184).
|
||||
* [#502](https://github.com/shlinkio/shlink/issues/502) Fixed error when providing the port as part of the domain on short URLs.
|
||||
* [#509](https://github.com/shlinkio/shlink/issues/509) Fixed error when trying to generate a QR code for a short URL which uses a custom domain.
|
||||
|
||||
|
||||
## 1.19.0 - 2019-10-05
|
||||
|
|
|
@ -36,10 +36,10 @@ class QrCodeActionTest extends TestCase
|
|||
}
|
||||
|
||||
/** @test */
|
||||
public function aNotFoundShortCodeWillDelegateIntoNextMiddleware()
|
||||
public function aNotFoundShortCodeWillDelegateIntoNextMiddleware(): void
|
||||
{
|
||||
$shortCode = 'abc123';
|
||||
$this->urlShortener->shortCodeToUrl($shortCode)->willThrow(EntityDoesNotExistException::class)
|
||||
$this->urlShortener->shortCodeToUrl($shortCode, '')->willThrow(EntityDoesNotExistException::class)
|
||||
->shouldBeCalledOnce();
|
||||
$delegate = $this->prophesize(RequestHandlerInterface::class);
|
||||
$process = $delegate->handle(Argument::any())->willReturn(new Response());
|
||||
|
@ -50,10 +50,10 @@ class QrCodeActionTest extends TestCase
|
|||
}
|
||||
|
||||
/** @test */
|
||||
public function anInvalidShortCodeWillReturnNotFoundResponse()
|
||||
public function anInvalidShortCodeWillReturnNotFoundResponse(): void
|
||||
{
|
||||
$shortCode = 'abc123';
|
||||
$this->urlShortener->shortCodeToUrl($shortCode)->willThrow(InvalidShortCodeException::class)
|
||||
$this->urlShortener->shortCodeToUrl($shortCode, '')->willThrow(InvalidShortCodeException::class)
|
||||
->shouldBeCalledOnce();
|
||||
$delegate = $this->prophesize(RequestHandlerInterface::class);
|
||||
$process = $delegate->handle(Argument::any())->willReturn(new Response());
|
||||
|
@ -64,10 +64,10 @@ class QrCodeActionTest extends TestCase
|
|||
}
|
||||
|
||||
/** @test */
|
||||
public function aCorrectRequestReturnsTheQrCodeResponse()
|
||||
public function aCorrectRequestReturnsTheQrCodeResponse(): void
|
||||
{
|
||||
$shortCode = 'abc123';
|
||||
$this->urlShortener->shortCodeToUrl($shortCode)->willReturn(new ShortUrl(''))
|
||||
$this->urlShortener->shortCodeToUrl($shortCode, '')->willReturn(new ShortUrl(''))
|
||||
->shouldBeCalledOnce();
|
||||
$delegate = $this->prophesize(RequestHandlerInterface::class);
|
||||
|
||||
|
|
Loading…
Reference in a new issue