mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Allows you to just specify an exception message when calling throws.
This commit is contained in:
@ -13,3 +13,7 @@ it('catch exceptions', function () {
|
||||
it('catch exceptions and messages', function () {
|
||||
throw new Exception('Something bad happened');
|
||||
})->throws(Exception::class, 'Something bad happened');
|
||||
|
||||
it('can just define the message', function () {
|
||||
throw new Exception('Something bad happened');
|
||||
})->throws('Something bad happened');
|
||||
|
||||
Reference in New Issue
Block a user