/**
  * @param Exception $exception
  * @return array
  */
 private function getExceptionExamplePosition(Exception $exception)
 {
     $cause = $exception->getCause();
     foreach ($exception->getTrace() as $call) {
         if (!isset($call['file'])) {
             continue;
         }
         if (!empty($cause) && $cause->getFilename() === $call['file']) {
             return array($call['file'], $call['line']);
         }
     }
     return array($exception->getFile(), $exception->getLine());
 }
 /**
  * @param PhpSpecException $exception
  *
  * @return array
  */
 protected function getExceptionExamplePosition(PhpSpecException $exception)
 {
     $refl = $exception->getCause();
     foreach ($exception->getTrace() as $call) {
         if (!isset($call['file'])) {
             continue;
         }
         if (!empty($refl) && $refl->getFilename() === $call['file']) {
             return array($call['file'], $call['line']);
         }
     }
     return array($exception->getFile(), $exception->getLine());
 }
 function it_presents_the_code_around_where_exception_was_thrown(Exception $e)
 {
     $e->getCause()->willReturn(new \ReflectionClass($this));
     $this->presentException($e, true);
 }