mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-28 09:51:40 -06:00
Fixed tests
This commit is contained in:
parent
cb23d38b38
commit
9fb07f4039
@ -205,18 +205,18 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getMaxVisits(): int
|
||||
public function getMaxVisits()
|
||||
{
|
||||
return $this->maxVisits;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $maxVisits
|
||||
* @param int|null $maxVisits
|
||||
* @return $this|self
|
||||
*/
|
||||
public function setMaxVisits(int $maxVisits): self
|
||||
public function setMaxVisits($maxVisits): self
|
||||
{
|
||||
$this->maxVisits = $maxVisits;
|
||||
return $this;
|
||||
|
@ -87,9 +87,14 @@ class CreateShortcodeActionTest extends TestCase
|
||||
*/
|
||||
public function nonUniqueSlugReturnsError()
|
||||
{
|
||||
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'), null, null, 'foo')
|
||||
->willThrow(NonUniqueSlugException::class)
|
||||
->shouldBeCalledTimes(1);
|
||||
$this->urlShortener->urlToShortCode(
|
||||
Argument::type(Uri::class),
|
||||
Argument::type('array'),
|
||||
null,
|
||||
null,
|
||||
'foo',
|
||||
Argument::cetera()
|
||||
)->willThrow(NonUniqueSlugException::class)->shouldBeCalledTimes(1);
|
||||
|
||||
$request = ServerRequestFactory::fromGlobals()->withParsedBody([
|
||||
'longUrl' => 'http://www.domain.com/foo/bar',
|
||||
|
Loading…
Reference in New Issue
Block a user