Fixed tests

This commit is contained in:
Alejandro Celaya
2017-10-22 09:17:19 +02:00
parent cb23d38b38
commit 9fb07f4039
2 changed files with 12 additions and 7 deletions

View File

@@ -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',