From dd2921fd26fa02673077d5b75b8756a6f5adcdbc Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 10 Jun 2021 19:26:42 +0100 Subject: [PATCH] tests: fixes snapshots --- tests/.snapshots/success.txt | 5 +++-- tests/Features/Incompleted.php | 6 ++---- tests/Features/PendingHigherOrderTests.php | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index c8c969ee..946c9e7b 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -109,12 +109,12 @@ ✓ it is capable doing multiple assertions WARN Tests\Features\Incompleted + … 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 @@ -126,6 +126,7 @@ ✓ it will throw exception from call if no macro exists PASS Tests\Features\PendingHigherOrderTests + ✓ get 'foo' ✓ get 'foo' → get 'bar' → expect true → toBeTrue ✓ get 'foo' → expect true → toBeTrue @@ -275,5 +276,5 @@ ✓ it is a test ✓ it uses correct parent class - Tests: 1 risked, 3 incompleted, 7 skipped, 167 passed + Tests: 4 incompleted, 7 skipped, 168 passed \ No newline at end of file diff --git a/tests/Features/Incompleted.php b/tests/Features/Incompleted.php index 7e57b292..b32a1954 100644 --- a/tests/Features/Incompleted.php +++ b/tests/Features/Incompleted.php @@ -1,5 +1,7 @@ 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 test with no assertions', function () { - // ... -}); - it('is not incompleted because of test with assertions', function () { expect(true)->toBeTrue(); }); diff --git a/tests/Features/PendingHigherOrderTests.php b/tests/Features/PendingHigherOrderTests.php index cf68dcc6..dbe59216 100644 --- a/tests/Features/PendingHigherOrderTests.php +++ b/tests/Features/PendingHigherOrderTests.php @@ -26,5 +26,6 @@ trait Gettable } } +get('foo'); // not incomplete because closure is created... get('foo')->get('bar')->expect(true)->toBeTrue(); get('foo')->expect(true)->toBeTrue();