Merge branch 'master' into skip-closure-support

# Conflicts:
#	src/Support/HigherOrderMessage.php
This commit is contained in:
luke
2021-07-08 17:50:48 +01:00
6 changed files with 116 additions and 8 deletions

View File

@ -410,6 +410,8 @@
PASS Tests\Features\HigherOrderTests
✓ it proxies calls to object
✓ it is capable doing multiple assertions
✓ it resolves expect callables correctly
✓ it can tap into the test
WARN Tests\Features\Incompleted
… incompleted
@ -579,5 +581,5 @@
✓ it is a test
✓ it uses correct parent class
Tests: 4 incompleted, 7 skipped, 363 passed
Tests: 4 incompleted, 7 skipped, 365 passed

View File

@ -1,5 +1,7 @@
<?php
use PHPUnit\Framework\TestCase;
beforeEach()->assertTrue(true);
it('proxies calls to object')->assertTrue(true);
@ -8,4 +10,18 @@ it('is capable doing multiple assertions')
->assertTrue(true)
->assertFalse(false);
it('resolves expect callables correctly')
->expect(function () { return 'foo'; })
->toBeString()
->toBe('foo')
->and('bar')
->toBeString()
->toBe('bar');
it('can tap into the test')
->expect('foo')->toBeString()
->tap(function () { expect($this)->toBeInstanceOf(TestCase::class); })
->toBe('foo')
->and('hello world')->toBeString();
afterEach()->assertTrue(true);