Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Asserts: Add expectThrowable() method (#5213)
* Asserts: add expectThrowable() With this method you can not only test Exceptions, like with expectException, but also Errors. Signed-off-by: Bernd Stellwag <burned@zerties.org> * Asserts tests: set up test class in setUp() Signed-off-by: Bernd Stellwag <burned@zerties.org> * Asserts: mention expectThrowable in the documentation Signed-off-by: Bernd Stellwag <burned@zerties.org> * Asserts: add type hint Signed-off-by: Bernd Stellwag <burned@zerties.org> * Asserts: since we marked expectedException as deprecated, use expectThrowable instead Signed-off-by: Bernd Stellwag <burned@zerties.org> * fix typos Signed-off-by: Bernd Stellwag <burned@zerties.org> * Asserts: try to make expectThrowable compatible with PHP 5.6 again Signed-off-by: Bernd Stellwag <burned@zerties.org> * don't use @ExpectedException annotation as it will get deprecated see sebastianbergmann/phpunit#3332
- Loading branch information
Showing
6 changed files
with
239 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.