/** * Paints a PHP error or exception. * @param string $message Message is ignored. * @access public * @abstract */ function paintError($message) { parent::paintError($message); echo PHP_EOL; echo " Error ", $this->getExceptionCount(), "!", PHP_EOL; echo " {$message}"; }
function paintError($message) { parent::paintError($message); $this->_response->addContent("Error !!\n"); $breadcrumb = $this->getTestList(); array_shift($breadcrumb); $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); $this->_response->addContent("\n\t " . $message . "\n"); }
function paintError($message) { parent::paintError($message); $str = "<span class=\"fail\">Exception</span>: "; $breadcrumb = $this->getTestList(); array_shift($breadcrumb); $str .= implode(" -> ", $breadcrumb); $str .= " -> <strong>" . $this->_htmlEntities($message) . "</strong><br />\n"; $this->_response->body->append('MAIN', $str); }
public function paintError($message) { parent::paintError($message); echo ' <tr class="fail">', "\n"; echo ' <td nowrap="nowrap" valign="top"><span class="fail">Error</span></td>', "\n"; echo ' <td nowrap="nowrap" valign="top"><span class="test_case">', $this->_getTestCase(), '</span></td>', "\n"; echo ' <td nowrap="nowrap" valign="top">', $this->_htmlEntities($message), '</td>', "\n"; echo ' </tr>', "\n"; flush(); }
/** * Paints a PHP error or exception. * @param string $message Message is ignored. * @access public **/ function paintError($message) { parent::paintError($message); $this->test_stack[] = array('data' => array($this->_htmlEntities($message), 'EXCEPTION'), 'class' => 'simpletest-fail'); //$this->writeContent($this->_htmlEntities($message). ' EXCEPTION', NULL, 'simpletest-fail'); }
function paintError($message) { parent::paintError($message); $this->errorCount++; }
/** * Paints error as XML. * * @param string $message Message to encode. */ public function paintError($message) { parent::paintError($message); print $this->getIndent(1); print '<' . $this->namespace . 'exception>'; print $this->toParsedXml($message); print '</' . $this->namespace . "exception>\n"; }
/** * Invokes run() on all of the held test cases, instantiating * them if necessary. * @param SimpleReporter $reporter Current test reporter. * @access public */ function run(&$reporter) { $reporter->paintGroupStart($this->getLabel(), $this->getSize()); for ($i = 0, $count = count($this->_test_cases); $i < $count; $i++) { if (is_string($this->_test_cases[$i])) { $class = $this->_test_cases[$i]; // moodle hack start - need to do this before the constructor call, because of FakeDBUnitTestCase. global $CFG; if (is_subclass_of($class, 'FakeDBUnitTestCase')) { // Do not execute this test because the test tables system no longer works, reporting it as exception $reporter->paintError("Unit test \"{$class}\" of type FakeDBUnitTestCase no longer supported. Must be migrated to UnitTestCaseUsingDatabase."); continue; } if (is_subclass_of($class, 'UnitTestCaseUsingDatabase') && empty($CFG->unittestprefix)) { // Do not execute this test because $CFG->unittestprefix is not set, but it will be required. $reporter->paintSkip("Unit test \"{$class}\" of type UnitTestCaseUsingDatabase skipped. Must define different, non-conflicting \$CFG->unittestprefix to be runnable."); continue; } // moodle hack end $test = new $class(); $test->run($reporter); unset($test); } else { $this->_test_cases[$i]->run($reporter); } } $reporter->paintGroupEnd($this->getLabel()); return $reporter->getStatus(); }
/** * @param string $message */ public function paintError($message) { parent::paintError($message); if (preg_match('!^Unexpected PHP error \\[(.*)\\] severity \\[.*\\] in \\[(.+) line (\\d+)]$!', $message, $matches)) { $this->writeError($matches[1], null, $matches[2], $matches[3], $matches[1]); } else { $this->writeError($message); } }
function paintError($message) { SimpleReporter::paintError($message); print '<div class="exception"><strong>Exception</strong>: '; $breadcrumb = $this->getTestList(); array_shift($breadcrumb); print implode(" -> ", $breadcrumb); print "<p>" . $this->_htmlEntities($message) . "</p></div>\n"; }
public function paintError($message) { parent::paintError($message); $this->method_status['errors'][] = $message; printf("<div>" . '<strong>Error</strong>: %s</div>', $message); }
/** * Paints a PHP error. * @param string $message Message is ignored. * @access public */ function paintError($message) { parent::paintError($message); print "<span class=\"fail\">Exception</span>: "; $breadcrumb = $this->getTestList(); array_shift($breadcrumb); print implode(" -> ", $breadcrumb); print " -> <strong>" . $this->_htmlEntities($message) . "</strong><br />\n"; flush(); }
function paintError($message) { parent::paintError($message); error_log("Error: " . $message); $this->terminateAbnormally($message); }
/** * Paints a PHP error or exception. * @param string $message Message to be shown. * @access public * @abstract */ function paintError($message) { parent::paintError($message); print "Exception " . $this->getExceptionCount() . "!\n{$message}\n"; if ($this->includeBreadCrumb()) { $breadcrumb = $this->getTestList(); array_shift($breadcrumb); print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); print "\n"; } }
/** * Paints a PHP error. * @param string $message Message is ignored. * @access public */ function paintError($message) { parent::paintError($message); echo "<li class='error'>\n"; echo "<span>Error</span>"; echo "<div class='msg'>" . $this->_htmlEntities($message) . "</div>\n"; $breadcrumb = Set::filter($this->getTestList()); array_shift($breadcrumb); echo "<div>" . implode(" -> ", $breadcrumb) . "</div>\n"; echo "</li>\n"; }
/** * @param string $message */ public function paintError($message) { parent::paintError($message); $this->paintFailureOrError($message, 'error'); }
/** * Paints a PHP error or exception. * @param string $message Message is ignored. * @access public * @abstract */ function paintError($message) { parent::paintError($message); print $this->_getIndent(1); print "<" . $this->_namespace . "exception>"; print $this->toParsedXml($message); print "</" . $this->_namespace . "exception>\n"; }
function paintError($message) { parent::paintError($message); $this->_addToOutput('FORMATED', $message); }
/** * Paints a PHP error or exception. * @param string $message Message to be shown. * @access public * @abstract */ function paintError($message) { parent::paintError($message); print "Exception " . $this->getExceptionCount() . "!\n{$message}\n"; }
/** * Paints a PHP error or exception. * @param string $message Message is ignored. * @access public * @abstract */ function paintError($message) { parent::paintError($message); $this->addError(self::E_TYPE_ERROR, $this->getTestList(), $message, $message); }
/** * Paints a PHP error or exception. * * @param string $message Message to be shown. * * @abstract */ public function paintError($message) { parent::paintError($message); print 'Exception ' . $this->getExceptionCount() . "!\n{$message}\n"; $breadcrumb = $this->getTestList(); array_shift($breadcrumb); print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); print "\n"; }
/** * Paints a test error. * * @param string $message The message of the test error. * * @return void */ public function paintError($message) { parent::paintError($message); print "\n\nERROR: " . $message . "\n\n"; }