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