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