Updated action and command to create short urls so that it accepts validity dates

This commit is contained in:
Alejandro Celaya
2017-10-21 12:24:53 +02:00
parent 070055a8b9
commit 0232f68b91
5 changed files with 53 additions and 12 deletions

View File

@@ -52,7 +52,7 @@ class CreateShortcodeActionTest extends TestCase
*/
public function properShortcodeConversionReturnsData()
{
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'))
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'), null, null)
->willReturn('abc123')
->shouldBeCalledTimes(1);
@@ -69,7 +69,7 @@ class CreateShortcodeActionTest extends TestCase
*/
public function anInvalidUrlReturnsError()
{
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'))
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'), null, null)
->willThrow(InvalidUrlException::class)
->shouldBeCalledTimes(1);
@@ -86,7 +86,7 @@ class CreateShortcodeActionTest extends TestCase
*/
public function aGenericExceptionWillReturnError()
{
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'))
$this->urlShortener->urlToShortCode(Argument::type(Uri::class), Argument::type('array'), null, null)
->willThrow(\Exception::class)
->shouldBeCalledTimes(1);