mirror of
https://github.com/pestphp/pest.git
synced 2026-04-25 16:37:27 +02:00
create Any matcher
This commit is contained in:
@ -21,6 +21,10 @@ test('failures with message', function () use ($obj) {
|
||||
expect($obj)->toHaveProperty(name: 'bar', failureMessage: 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('failures with message and Any matcher', function () use ($obj) {
|
||||
expect($obj)->toHaveProperty('bar', expect()->any(), 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('not failures', function () use ($obj) {
|
||||
expect($obj)->not->toHaveProperty('foo');
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user