Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pestphp/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Nov 15, 2023
2 parents 80f4e26 + 4f65b7e commit 4dfb73c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ it('throws exception', function () {
});
```

If you expect no exceptions to be thrown, you can use the `throwsNoExceptions()` method.

```php
it('throws no exceptions', function () {
$result = 1 + 1;
})->throwsNoExceptions();
```

---

After learning how to write tests that assert exceptions, the next step is to explore "Test Filtering". This feature allows you to efficiently run specific tests based on criteria like test name, dirty files, and more: [Filtering Tests →](/docs/filtering-tests)

0 comments on commit 4dfb73c

Please sign in to comment.