Tag reference
@expectedException
The @expectedException tag declares the Throwable a test method is
expected to throw. It is an old PHPUnit-era convention that predates the
expectException() method call and is unrelated to PhpStorm itself.
Grammar
"@expectedException" <Type> [ <Description> ]Examples
/** * @expectedException InvalidArgumentException */public function testRejectsNegativeAmount(): voidNames by platform
- phpstorm
@expectedException
Parsing a @expectedException tag produces a ExpectedExceptionTag instance, carrying the
parsed $type alongside the $name and optional $description every
Tag already provides.
final class ExpectedExceptionTag extends TypedTag {}A historical PHPUnit convention, not a PhpStorm tag.