mirror of
https://github.com/filp/whoops.git
synced 2026-08-30 12:07:25 +00:00
@@ -157,10 +157,10 @@ class Inspector
|
||||
*
|
||||
* If xdebug is installed
|
||||
*
|
||||
* @param Exception $e
|
||||
* @param \Throwable $exception
|
||||
* @return array
|
||||
*/
|
||||
protected function getTrace(\Exception $e)
|
||||
protected function getTrace($e)
|
||||
{
|
||||
$traces = $e->getTrace();
|
||||
|
||||
|
||||
@@ -44,6 +44,23 @@ class InspectorTest extends TestCase
|
||||
$this->assertSame($outer->getLine(), $frames[0]->getLine());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Whoops\Exception\Inspector::getFrames
|
||||
*/
|
||||
public function testDoesNotFailOnPHP7ErrorObject()
|
||||
{
|
||||
if (!class_exists('Error')) {
|
||||
$this->markTestSkipped(
|
||||
'PHP 5.x, the Error class is not available.'
|
||||
);
|
||||
}
|
||||
|
||||
$inner = new \Error('inner');
|
||||
$outer = $this->getException('outer', 0, $inner);
|
||||
$inspector = $this->getInspectorInstance($outer);
|
||||
$frames = $inspector->getFrames();
|
||||
$this->assertSame($outer->getLine(), $frames[0]->getLine());
|
||||
}
|
||||
/**
|
||||
* @covers Whoops\Exception\Inspector::getExceptionName
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user