Adds support for incompleted tests

This commit is contained in:
Nuno Maduro
2021-06-10 19:20:16 +01:00
parent 95e8add29b
commit 49de462250
3 changed files with 35 additions and 3 deletions

View File

@ -108,6 +108,15 @@
✓ it proxies calls to object
✓ it is capable doing multiple assertions
WARN Tests\Features\Incompleted
… it is incompleted
… it is incompleted even with method calls like skip
… it is incompleted even with method calls like group
✓ it is not incompleted because of expect
✓ it is not incompleted because of assert
! it is not incompleted because of test with no assertions → This test did not perform any assertions /Users/nunomaduro/code/pestphp/pest/src/Factories/TestCaseFactory.php(221) : eval()'d code:4
✓ it is not incompleted because of test with assertions
PASS Tests\Features\It
✓ it is a test
✓ it is a higher order message test
@ -266,5 +275,5 @@
✓ it is a test
✓ it uses correct parent class
Tests: 7 skipped, 164 passed
Tests: 1 risked, 3 incompleted, 7 skipped, 167 passed

View File

@ -0,0 +1,19 @@
<?php
it('is incompleted');
it('is incompleted even with method calls like skip')->skip(false);
it('is incompleted even with method calls like group')->group('wtv');
it('is not incompleted because of expect')->expect(true)->toBeTrue();
it('is not incompleted because of assert')->assertTrue(true);
it('is not incompleted because of test with no assertions', function () {
// ...
});
it('is not incompleted because of test with assertions', function () {
expect(true)->toBeTrue();
});