Skip to content

Commit 5e9ae53

Browse files
committed
assert doesnt throw
1 parent 3c910b6 commit 5e9ae53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

http-tests.md

+6
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,12 @@ $this->assertThrows(
441441
);
442442
```
443443

444+
The `assertDoesntThrow` method may be used to assert that the code within a given closure does not throw any exceptions:
445+
446+
```php
447+
$this->assertDoesntThrow(fn () => (new ProcessOrder)->execute());
448+
```
449+
444450
<a name="testing-json-apis"></a>
445451
## Testing JSON APIs
446452

0 commit comments

Comments
 (0)