{"id":93645,"library":"vladahejda-phpunit-assert-exception","title":"PHPUnit Assert Exception","description":"Assert exception/throwable/error PHPUnit trait.","status":"active","version":"1.3.0","language":"php","source_language":null,"source_url":"https://github.com/VladaHejda/PhpUnitAssertException","tags":["phpunit","testing","exception","assertion"],"install":[{"cmd":"composer require vladahejda/phpunit-assert-exception","lang":"bash","label":"composer require"}],"dependencies":[],"imports":[{"symbol":"AssertException","correct":"use VladaHejda\\PhpUnitAssertException\\AssertException;"}],"quickstart":{"code":"use VladaHejda\\PhpUnitAssertException\\AssertException;\n\nclass MyTest extends \\PHPUnit\\Framework\\TestCase {\n    use AssertException;\n\n    public function testException() {\n        $this->assertException(\\InvalidArgumentException::class, function() {\n            throw new \\InvalidArgumentException();\n        });\n    }\n}","lang":"php","description":"Provides a trait to assert exceptions in PHPUnit tests."},"warnings":[{"fix":"Ensure PHPUnit version compatibility and avoid using other exception assertion traits.","message":"Only works with PHPUnit 8+ and may conflict with other exception assertion methods.","severity":"breaking","affected_versions":">=1.3.0"}],"env_vars":null,"search_vec":"'assert':2,4,11 'except':3,10 'exception/throwable/error':5 'phpunit':1,6,8 'test':9 'trait':7","created_at":"2026-06-19T09:53:28.603394+00:00","updated_at":"2026-06-19T09:53:28.603394+00:00","problems":[],"ecosystem":"packagist","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/VladaHejda/PhpUnitAssertException","github":"https://github.com/VladaHejda/PhpUnitAssertException","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-19","next_check":"2026-12-16","install_tag":null}}