tests: fixes snapshots

This commit is contained in:
Nuno Maduro
2021-06-10 19:26:42 +01:00
parent 977dbb5bcb
commit dd2921fd26
3 changed files with 6 additions and 6 deletions

View File

@ -109,12 +109,12 @@
✓ it is capable doing multiple assertions ✓ it is capable doing multiple assertions
WARN Tests\Features\Incompleted WARN Tests\Features\Incompleted
… incompleted
… it is incompleted … it is incompleted
… it is incompleted even with method calls like skip … it is incompleted even with method calls like skip
… it is incompleted even with method calls like group … it is incompleted even with method calls like group
✓ it is not incompleted because of expect ✓ it is not incompleted because of expect
✓ it is not incompleted because of assert ✓ 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 ✓ it is not incompleted because of test with assertions
PASS Tests\Features\It PASS Tests\Features\It
@ -126,6 +126,7 @@
✓ it will throw exception from call if no macro exists ✓ it will throw exception from call if no macro exists
PASS Tests\Features\PendingHigherOrderTests PASS Tests\Features\PendingHigherOrderTests
✓ get 'foo'
✓ get 'foo' → get 'bar' → expect true → toBeTrue ✓ get 'foo' → get 'bar' → expect true → toBeTrue
✓ get 'foo' → expect true → toBeTrue ✓ get 'foo' → expect true → toBeTrue
@ -275,5 +276,5 @@
✓ it is a test ✓ it is a test
✓ it uses correct parent class ✓ it uses correct parent class
Tests: 1 risked, 3 incompleted, 7 skipped, 167 passed Tests: 4 incompleted, 7 skipped, 168 passed

View File

@ -1,5 +1,7 @@
<?php <?php
test('incompleted');
it('is incompleted'); it('is incompleted');
it('is incompleted even with method calls like skip')->skip(false); it('is incompleted even with method calls like skip')->skip(false);
@ -10,10 +12,6 @@ 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 assert')->assertTrue(true);
it('is not incompleted because of test with no assertions', function () {
// ...
});
it('is not incompleted because of test with assertions', function () { it('is not incompleted because of test with assertions', function () {
expect(true)->toBeTrue(); expect(true)->toBeTrue();
}); });

View File

@ -26,5 +26,6 @@ trait Gettable
} }
} }
get('foo'); // not incomplete because closure is created...
get('foo')->get('bar')->expect(true)->toBeTrue(); get('foo')->get('bar')->expect(true)->toBeTrue();
get('foo')->expect(true)->toBeTrue(); get('foo')->expect(true)->toBeTrue();