Forces higher order test callable expects to be closures.

This commit is contained in:
luke
2021-07-11 07:56:02 +01:00
parent 5ab3c6e2d7
commit c160d97428
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,9 @@ it('resolves expect callables correctly')
->toBeString()
->toBe('bar');
test('does not treat method names as callables')
->expect('it')->toBeString();
it('can tap into the test')
->expect('foo')->toBeString()
->tap(function () { expect($this)->toBeInstanceOf(TestCase::class); })