mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
revert expectation failure message arg back to $message
This commit is contained in:
@ -25,7 +25,7 @@ test('failures', function () use ($test_array) {
|
||||
})->throws(ExpectationFailedException::class, "Failed asserting that an array has the key 'foo'");
|
||||
|
||||
test('failures with custom message', function () use ($test_array) {
|
||||
expect($test_array)->toHaveKey('foo', failureMessage: 'oh no!');
|
||||
expect($test_array)->toHaveKey('foo', message: 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('failures with custom message and Any matcher', function () use ($test_array) {
|
||||
@ -37,7 +37,7 @@ test('failures with nested key', function () use ($test_array) {
|
||||
})->throws(ExpectationFailedException::class, "Failed asserting that an array has the key 'd.bar'");
|
||||
|
||||
test('failures with nested key and custom message', function () use ($test_array) {
|
||||
expect($test_array)->toHaveKey('d.bar', failureMessage: 'oh no!');
|
||||
expect($test_array)->toHaveKey('d.bar', message: 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('failures with nested key and custom message with Any matcher', function () use ($test_array) {
|
||||
|
||||
@ -18,7 +18,7 @@ test('failures', function () use ($obj) {
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('failures with message', function () use ($obj) {
|
||||
expect($obj)->toHaveProperty(name: 'bar', failureMessage: 'oh no!');
|
||||
expect($obj)->toHaveProperty(name: 'bar', message: 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('failures with message and Any matcher', function () use ($obj) {
|
||||
|
||||
Reference in New Issue
Block a user