Registry / testing / jchook-phpunit-assert-throws

jchook-phpunit-assert-throws

JSON →
library1.0.3phppackagistunverified

Exception assertions for PHPUnit

composer require jchook/phpunit-assert-throws
INSTALL
IMPORT
SIG · JCHOOK-PHPUNIT-ASS
J
jchook-phpunit-assert-throws
testingphpv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AssertThrows
use Jchook\PhpUnit\AssertThrows;

Assert that a callback throws a specific exception

use Jchook\PhpUnit\AssertThrows; $trait = new AssertThrows(); $trait->assertThrows(\InvalidArgumentException::class, function () { throw new \InvalidArgumentException('test'); });
Debug
Known issues
breakingRequires PHPUnit 8 or higher
fix
Update PHPUnit to version 8+
affects: >=1.0.0
Upgrade
Version history
1.0.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
jchook-phpunit-assert-throws — pip install jchook-phpunit-assert-throws · libregistry