Refactored ValidationException (-> InvalidArgumentException).

This commit is contained in:
Dmitry Khomutov 2018-03-17 09:24:30 +07:00
commit 2a3adf25af
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
20 changed files with 79 additions and 91 deletions

View file

@ -73,14 +73,4 @@ class HttpExceptionTest extends \PHPUnit\Framework\TestCase
self::assertTrue($ex->getStatusMessage() == 'Internal Server Error');
}
}
public function testValidationException()
{
try {
throw new HttpException\ValidationException('Test');
} catch (HttpException $ex) {
self::assertTrue($ex->getErrorCode() == 400);
self::assertTrue($ex->getStatusMessage() == 'Bad Request');
}
}
}