HtmlReporter::paintFail PHP Метод

paintFail() публичный Метод

Paints the test failure with a breadcrumbs trail of the nesting test suites below the top level test.
public paintFail ( string $message )
$message string Failure message displayed in the context of the other tests.
    public function paintFail($message)
    {
        parent::paintFail($message);
        print '<span class="fail">Fail</span>: ';
        $breadcrumb = $this->getTestList();
        array_shift($breadcrumb);
        print implode(' -&gt; ', $breadcrumb);
        print ' -&gt; ' . $this->htmlEntities($message) . "<br />\n";
    }

Usage Example

Пример #1
0
 function paintFail($message)
 {
     ob_start();
     parent::paintFail($message);
     ob_get_clean();
     print "<div class='box' style='margin:auto;width:95%;margin-bottom:20px;'>\n";
     print "<span class=\"fail\">Fail</span>: ";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     $breadcrumb[count($breadcrumb) - 1] = str_replace(array('test_', '_'), array('', ' '), $breadcrumb[count($breadcrumb) - 1]);
     print implode("->", $breadcrumb) . '<br>';
     print $this->htmlEntities($message) . "\n";
     print "</div>\n";
 }
All Usage Examples Of HtmlReporter::paintFail