From 53c20d9cd2877f8a0f18df940a22d2e5562de1dc Mon Sep 17 00:00:00 2001 From: Luke Downing Date: Tue, 22 Mar 2022 13:19:23 +0000 Subject: [PATCH] Renames method to `throwsNoExceptions`. --- src/PendingCalls/TestCall.php | 6 ++++-- .../{HasNoExpectations.php => ThrowsNoExceptions.php} | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) rename tests/Features/{HasNoExpectations.php => ThrowsNoExceptions.php} (90%) 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();