/** * @param \Exception $exception */ public function __construct(\Exception $exception) { parent::__construct($exception); $this->fileName = $exception->getFile(); $this->line = $exception->getLine(); $this->trace = $exception->getTraceAsString(); }
public function testGetDetails() { $error = new Error(new Exception('', 0, 500, ['details'])); $this->assertEquals(['details'], $error->getDetails()); }