docs
docs copied to clipboard
improve fail() and fails() doc
Hello everybody,
This PR proposes an improvement on fail() and fails() methods.
I have provided new examples for PASS and FAIL for fails(), replacing the \Exception with the fail() method, as the current example results in an Exception.
it('fails', function () {
throw new Exception('Something happened.');
})->fails('Something went wrong.');
Exception
FAIL Tests\Feature\ExampleTest
⨯ it fails 0.11s
FAILED Tests\Feature\ExampleTest > it fails
Failed asserting that exception of type "Exception" matches expected exception "PHPUnit\Framework\AssertionFailedError". Message was: "Something happened." at
Greetings and thanks
Dan