Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

setExpectedException deprecated? #105

Merged
merged 2 commits into from
Dec 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions doc/book/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,8 @@ public function testExceptionIsThrownWhenGettingNonExistentAlbum()
->select(['id' => 123])
->willReturn($resultSet->reveal());

$this->setExpectedException(
RuntimeException::class,
'Could not find row with identifier 123'
);
$this->expectException(RuntimeException::class);
$this->expectExceptionMessage('Could not find row with identifier 123');
$this->albumTable->getAlbum(123);
}
```
Expand Down