refactor: expectation match method

This commit is contained in:
Nuno Maduro
2021-09-24 22:02:18 +01:00
parent ae029660e3
commit 457972716f
3 changed files with 16 additions and 17 deletions

View File

@ -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)