public function testCreateErrorFromErrorException() { $error = $this->factory->createError($this->getErrorExceptionMock('foo', 'bar.php', 13)); $this->assertEquals('{"message":"foo","severity":1,"trace":[],"type":"ErrorException"}', json_encode($error)); }
/** * Handles an exception. * * @param \Exception $exception */ public function handleException(\Exception $exception) { $this->errors[] = $this->factory->createError($exception); }