Chris@13: assertInstanceOf('Psy\Exception\Exception', $e); Chris@13: $this->assertInstanceOf('ErrorException', $e); Chris@13: $this->assertInstanceOf('Psy\Exception\FatalErrorException', $e); Chris@13: } Chris@13: Chris@13: public function testMessage() Chris@13: { Chris@13: $e = new FatalErrorException('{msg}', 0, 0, '{filename}', 13); Chris@13: Chris@13: $this->assertSame('{msg}', $e->getRawMessage()); Chris@13: $this->assertContains('{msg}', $e->getMessage()); Chris@13: $this->assertContains('{filename}', $e->getMessage()); Chris@13: $this->assertContains('line 13', $e->getMessage()); Chris@13: } Chris@13: Chris@13: public function testMessageWithNoFilename() Chris@13: { Chris@13: $e = new FatalErrorException('{msg}'); Chris@13: Chris@13: $this->assertSame('{msg}', $e->getRawMessage()); Chris@13: $this->assertContains('{msg}', $e->getMessage()); Chris@13: $this->assertContains('eval()\'d code', $e->getMessage()); Chris@13: } Chris@16: Chris@16: public function testNegativeOneLineNumberIgnored() Chris@16: { Chris@16: $e = new FatalErrorException('{msg}', 0, 1, null, -1); Chris@16: $this->assertEquals(0, $e->getLine()); Chris@16: } Chris@13: }