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:
Vincent Borgers
2026-11-03 17:42:45 +01:00
committed by GitHub
parent b3baf7e210
commit e107ac707c
16 changed files with 119 additions and 2 deletions
+4
View File
@@ -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);