paintFail() public method

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.
Esempio n. 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";
 }
Esempio n. 2
0
 function paintFail($message)
 {
     $this->paintHeader(" " . $_SESSION['test']);
     parent::paintFail($message);
     if (isset($_SESSION['mod1']) && isset($_SESSION['mod2'])) {
         $_SESSION['mod1']->writeAsHtmlTable();
         $_SESSION['mod2']->writeAsHtmlTable();
     }
     $this->paintFooter($_SESSION['test']);
     print "<hr><br>";
     $_SESSION['fails']++;
     if (LOG) {
         $file = fopen("testlog.log", "a");
         fputs($file, "\r\n" . $_SESSION['test'] . ' fails' . "\r\n");
         fclose($file);
     }
 }
Esempio n. 3
0
 function paintFail($message)
 {
     static $header = FALSE;
     if (!$header) {
         $this->newPaintHeader();
         $header = TRUE;
     }
     parent::paintFail($message);
 }
Esempio n. 4
0
 function paintFail($message)
 {
     parent::paintFail($message);
 }
 function paintFail($message)
 {
     $message = str_replace(TESTCASESFOLDER, '', $message);
     parent::paintFail($message);
 }
Esempio n. 6
0
 /**
  * Paint fail.
  *
  * @access public
  * @param  string $message
  * @return void
  */
 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";
 }