mirror of
https://github.com/pestphp/pest.git
synced 2026-12-07 00:02:16 +01:00
Add default failure messages to the remaining string expectations (#1948)
* Add default failure messages to the remaining string expectations * test: update parallel snapshot count for the new default-message cases --------- Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
@@ -23,6 +23,10 @@ test('failures with custom message', function (): void {
|
||||
expect('not-a-mac')->toBeMacAddress('oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('failures with default message', function (): void {
|
||||
expect('not-a-mac')->toBeMacAddress();
|
||||
})->throws(ExpectationFailedException::class, 'Failed asserting that not-a-mac is a MAC address.');
|
||||
|
||||
test('not failures', function (): void {
|
||||
expect('00:1a:2b:3c:4d:5e')->not->toBeMacAddress();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user