mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
refactor: expectation match method
This commit is contained in:
@ -171,7 +171,7 @@
|
||||
✓ it runs with truthy closure condition
|
||||
✓ it runs with falsy closure condition
|
||||
✓ it can be passed non-callable values
|
||||
✓ it passes with empty data
|
||||
✓ it fails with unhandled match
|
||||
✓ it can be used in higher order tests
|
||||
|
||||
PASS Tests\Features\Expect\not
|
||||
|
||||
@ -130,11 +130,9 @@ it('can be passed non-callable values', function () {
|
||||
);
|
||||
})->throws(ExpectationFailedException::class, 'two strings are equal');
|
||||
|
||||
it('passes with empty data', function () {
|
||||
expect('foo')
|
||||
->match('bar', [])
|
||||
->toEqual('foo');
|
||||
});
|
||||
it('fails with unhandled match', function () {
|
||||
expect('foo')->match('bar', []);
|
||||
})->throws(ExpectationFailedException::class, 'Unhandled match value.');
|
||||
|
||||
it('can be used in higher order tests')
|
||||
->expect(true)
|
||||
|
||||
Reference in New Issue
Block a user