diff --git a/src/PendingCalls/TestCall.php b/src/PendingCalls/TestCall.php index 53405722..56172023 100644 --- a/src/PendingCalls/TestCall.php +++ b/src/PendingCalls/TestCall.php @@ -161,9 +161,11 @@ final class TestCall } /** - * Informs the test runner that no expectations happen in this test. + * Informs the test runner that no expectations happen in this test, + * and its purpose is simply to check whether the given code can + * be executed without throwing exceptions. */ - public function hasNoExpectations(): TestCall + public function throwsNoExceptions(): TestCall { $this->testCaseMethod->proxies->add(Backtrace::file(), Backtrace::line(), 'expectNotToPerformAssertions', []); diff --git a/tests/Features/HasNoExpectations.php b/tests/Features/ThrowsNoExceptions.php similarity index 90% rename from tests/Features/HasNoExpectations.php rename to tests/Features/ThrowsNoExceptions.php index a5804466..98f38574 100644 --- a/tests/Features/HasNoExpectations.php +++ b/tests/Features/ThrowsNoExceptions.php @@ -8,4 +8,4 @@ it('allows access to the underlying expectNotToPerformAssertions method', functi it('allows performing no expectations without being risky', function () { $result = 1 + 1; -})->hasNoExpectations(); +})->throwsNoExceptions();