Download the PHP package zrnik/phpunit-exceptions without Composer
On this page you can find all versions of the php package zrnik/phpunit-exceptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download zrnik/phpunit-exceptions
More information about zrnik/phpunit-exceptions
Files in zrnik/phpunit-exceptions
Download zrnik/phpunit-exceptions
More information about zrnik/phpunit-exceptions
Files in zrnik/phpunit-exceptions
Vendor zrnik
Package phpunit-exceptions
Short Description Trait for easier exception testing in PHPUnit.
License MIT
Package phpunit-exceptions
Short Description Trait for easier exception testing in PHPUnit.
License MIT
Please rate this library. Is it a good library?
Informations about the package phpunit-exceptions
PHPUnit Exceptions
Trait for easier exception testing in PHPUnit.
Requirements
Usage:
Add a trait use Zrnik\PHPUnit\Exceptions;
to your test case.
Then the testing assertions are available.
Why
I had problem with default expectException
. The problem
was creating unnecessary amount of methods or using try/catch blocks
to check for exceptions. All exceptions are available in
the ./tests/AssertExceptionTest.php file.
Note: Maybe, im just bad at testing. It's totally possible...
Example 1.: Using too many methods...
Example 2.: Using try/catch block...
All versions of phpunit-exceptions with dependencies
PHP Build Version
Package Version
The package zrnik/phpunit-exceptions contains the following files
Loading the files please wait ....