Example #1
0
 private function _ErrorLocation(\Exception $e)
 {
     $trace = $e->GetTrace();
     $frame = NULL;
     // Find the first frame from non-PHPUnit code, which is where the error
     // should have occurred.
     foreach ($trace as $f) {
         if (isset($f['file']) && strpos($f['file'], 'PHPUnit/Framework') === FALSE) {
             $frame = $f;
             break;
         }
     }
     if (!$frame)
         $frame = $trace[0];
     return $frame['file'] . ':' . $frame['line'];
 }