public function testFormatInvocation()
 {
     $this->assertSame("Class->test('01234567890123\\n...'," . " Array, NULL, Object(stdClass))", StackTraceFormatter::formatInvocation(['class' => 'Class', 'type' => '->', 'function' => 'test', 'args' => ["01234567890123\n\n", [], null, new stdClass()]]));
 }
예제 #2
0
 /**
  * @return void
  */
 private function renderStackTrace()
 {
     echo '<table class="stack-trace"><tr><td class="content">', '<h2>Stack Trace</h2><table><tbody>';
     $index = 0;
     $last = count($this->trace) - 1;
     foreach ($this->trace as $frame) {
         if ($frame !== '{main}') {
             $invocation = StackTraceFormatter::formatInvocation($frame);
             echo '<tr><td class="index">', $index, '</td><td class="value';
             if ($index === $last) {
                 echo ' last';
             }
             echo '"><div class="frame"><div class="position">';
             if (isset($frame['file'])) {
                 $this->renderPath($frame['file'], ' <span class="line">' . $frame['line'] . '</span>');
             } else {
                 echo '<span class="internal">internal function</span>';
             }
             echo '</div><div class="invocation"><code>', $invocation, '</code></div></div></td></tr>';
         }
         ++$index;
     }
     echo '</tbody></table></td></tr></table>';
 }