mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
Merge pull request #196 from DannyvdSluijs/feature-fix-skip-on-higher-order-test
Revert to original target if new target is null
This commit is contained in:
@ -30,7 +30,7 @@ final class HigherOrderMessageCollection
|
|||||||
public function chain(object $target): void
|
public function chain(object $target): void
|
||||||
{
|
{
|
||||||
foreach ($this->messages as $message) {
|
foreach ($this->messages as $message) {
|
||||||
$target = $message->call($target);
|
$target = $message->call($target) ?? $target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -278,6 +278,7 @@
|
|||||||
|
|
||||||
PASS Tests\Features\HigherOrderTests
|
PASS Tests\Features\HigherOrderTests
|
||||||
✓ it proxies calls to object
|
✓ it proxies calls to object
|
||||||
|
✓ it is capable doing multiple assertions
|
||||||
|
|
||||||
PASS Tests\Features\It
|
PASS Tests\Features\It
|
||||||
✓ it is a test
|
✓ it is a test
|
||||||
@ -302,6 +303,7 @@
|
|||||||
- it skips with truthy closure condition
|
- it skips with truthy closure condition
|
||||||
✓ it do not skips with falsy closure condition
|
✓ it do not skips with falsy closure condition
|
||||||
- it skips with condition and message → skipped because foo
|
- it skips with condition and message → skipped because foo
|
||||||
|
- it skips when skip after assertion
|
||||||
|
|
||||||
PASS Tests\Features\Test
|
PASS Tests\Features\Test
|
||||||
✓ a test
|
✓ a test
|
||||||
@ -383,5 +385,5 @@
|
|||||||
✓ depends with defined arguments
|
✓ depends with defined arguments
|
||||||
✓ depends run test only once
|
✓ depends run test only once
|
||||||
|
|
||||||
Tests: 6 skipped, 226 passed
|
Tests: 7 skipped, 227 passed
|
||||||
|
|
||||||
@ -4,4 +4,8 @@ beforeEach()->assertTrue(true);
|
|||||||
|
|
||||||
it('proxies calls to object')->assertTrue(true);
|
it('proxies calls to object')->assertTrue(true);
|
||||||
|
|
||||||
|
it('is capable doing multiple assertions')
|
||||||
|
->assertTrue(true)
|
||||||
|
->assertFalse(false);
|
||||||
|
|
||||||
afterEach()->assertTrue(true);
|
afterEach()->assertTrue(true);
|
||||||
|
|||||||
@ -27,3 +27,7 @@ it('do not skips with falsy closure condition')
|
|||||||
it('skips with condition and message')
|
it('skips with condition and message')
|
||||||
->skip(true, 'skipped because foo')
|
->skip(true, 'skipped because foo')
|
||||||
->assertTrue(false);
|
->assertTrue(false);
|
||||||
|
|
||||||
|
it('skips when skip after assertion')
|
||||||
|
->assertTrue(true)
|
||||||
|
->skip();
|
||||||
|
|||||||
Reference in New Issue
Block a user