Adds support for Higher Order Expectations in Higher Order Tests

This commit is contained in:
luke
2021-07-09 16:50:15 +01:00
parent e4e9cb09e4
commit 2a8de0565f
6 changed files with 67 additions and 18 deletions

View File

@ -64,6 +64,11 @@ it('works with nested properties', function () {
->posts->toBeArray()->toHaveCount(2);
});
it('works with higher order tests')
->expect(new HasProperties())
->nested->foo->bar->toBeString()->toEqual('baz')
->posts->toBeArray()->toHaveCount(2);
class HasProperties
{
public $name = 'foo';