assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(\PhpParser\Error::class, $e); $this->assertInstanceOf(ParseErrorException::class, $e); } public function testMessage() { $e = new ParseErrorException('{msg}', 1); $this->assertStringContainsString('{msg}', $e->getMessage()); $this->assertStringContainsString('PHP Parse error:', $e->getMessage()); } public function testConstructFromParseError() { $e = ParseErrorException::fromParseError(new \PhpParser\Error('{msg}')); $this->assertStringContainsString('{msg}', $e->getRawMessage()); $this->assertStringContainsString('PHP Parse error:', $e->getMessage()); } }