mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 04:00:57 +03:00
Fixed tests
This commit is contained in:
parent
cb23d38b38
commit
9fb07f4039
2 changed files with 12 additions and 7 deletions
|
@ -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…
Add table
Reference in a new issue