Renames method to throwsNoExceptions.

This commit is contained in:
Luke Downing
2022-03-22 13:19:23 +00:00
parent 6d5a8a9235
commit 53c20d9cd2
2 changed files with 5 additions and 3 deletions

View File

@ -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', []); $this->testCaseMethod->proxies->add(Backtrace::file(), Backtrace::line(), 'expectNotToPerformAssertions', []);

View File

@ -8,4 +8,4 @@ it('allows access to the underlying expectNotToPerformAssertions method', functi
it('allows performing no expectations without being risky', function () { it('allows performing no expectations without being risky', function () {
$result = 1 + 1; $result = 1 + 1;
})->hasNoExpectations(); })->throwsNoExceptions();