Added as much additional data as possible to exceptions

This commit is contained in:
Alejandro Celaya
2019-11-27 20:18:36 +01:00
parent fffb2872ef
commit 5266743a0c
9 changed files with 26 additions and 84 deletions

View File

@@ -83,7 +83,7 @@ class DeleteShortUrlCommandTest extends TestCase
$ignoreThreshold = array_pop($args);
if (!$ignoreThreshold) {
throw new Exception\DeleteShortUrlException(10);
throw Exception\DeleteShortUrlException::fromVisitsThreshold(10, '');
}
}
);
@@ -112,7 +112,7 @@ class DeleteShortUrlCommandTest extends TestCase
{
$shortCode = 'abc123';
$deleteByShortCode = $this->service->deleteByShortCode($shortCode, false)->willThrow(
new Exception\DeleteShortUrlException(10)
Exception\DeleteShortUrlException::fromVisitsThreshold(10, '')
);
$this->commandTester->setInputs(['no']);