當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SimpleReporter::paintError方法代碼示例

本文整理匯總了PHP中SimpleReporter::paintError方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleReporter::paintError方法的具體用法?PHP SimpleReporter::paintError怎麽用?PHP SimpleReporter::paintError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SimpleReporter的用法示例。


在下文中一共展示了SimpleReporter::paintError方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: paintError

 /**
  *    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}";
 }
開發者ID:hiroki-ta,項目名稱:my.project,代碼行數:13,代碼來源:TextDetailReporter.php

示例2: paintError

 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");
 }
開發者ID:CREASIG,項目名稱:lizmap-web-client,代碼行數:9,代碼來源:jtextrespreporter.class.php

示例3: paintError

 function paintError($message)
 {
     parent::paintError($message);
     $str = "<span class=\"fail\">Exception</span>: ";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     $str .= implode(" -&gt; ", $breadcrumb);
     $str .= " -&gt; <strong>" . $this->_htmlEntities($message) . "</strong><br />\n";
     $this->_response->body->append('MAIN', $str);
 }
開發者ID:alienpham,項目名稱:helenekling,代碼行數:10,代碼來源:jhtmlrespreporter.class.php

示例4: paintError

 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();
 }
開發者ID:PublicityPort,項目名稱:OpenCATS,代碼行數:10,代碼來源:CATSTestReporter.php

示例5: paintError

 /**
  * 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');
 }
開發者ID:sdboyer,項目名稱:sdboyer-test,代碼行數:11,代碼來源:drupal_reporter.php

示例6: paintError

 function paintError($message)
 {
     parent::paintError($message);
     $this->errorCount++;
 }
開發者ID:altesien,項目名稱:FinalProject,代碼行數:5,代碼來源:SimpleTestResultFormatter.php

示例7: paintError

 /**
  * 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";
 }
開發者ID:guicara,項目名稱:simpletest,代碼行數:13,代碼來源:xml.php

示例8: run

 /**
  *    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();
 }
開發者ID:nuckey,項目名稱:moodle,代碼行數:34,代碼來源:test_case.php

示例9: paintError

 /**
  * @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);
     }
 }
開發者ID:rsky,項目名稱:stagehand-testrunner,代碼行數:12,代碼來源:JUnitXMLReporter.php

示例10: paintError

 function paintError($message)
 {
     SimpleReporter::paintError($message);
     print '<div class="exception"><strong>Exception</strong>: ';
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     print implode(" -&gt; ", $breadcrumb);
     print "<p>" . $this->_htmlEntities($message) . "</p></div>\n";
 }
開發者ID:BackupTheBerlios,項目名稱:wikirenderer,代碼行數:9,代碼來源:common.php

示例11: paintError

 public function paintError($message)
 {
     parent::paintError($message);
     $this->method_status['errors'][] = $message;
     printf("<div>" . '<strong>Error</strong>: %s</div>', $message);
 }
開發者ID:lubosdz,項目名稱:simpletest-visual-gui,代碼行數:6,代碼來源:SimpleHtmlReporter.php

示例12: paintError

 /**
  *    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(" -&gt; ", $breadcrumb);
     print " -&gt; <strong>" . $this->_htmlEntities($message) . "</strong><br />\n";
     flush();
 }
開發者ID:ivantcholakov,項目名稱:Bonfire,代碼行數:15,代碼來源:my_reporter.php

示例13: paintError

 function paintError($message)
 {
     parent::paintError($message);
     error_log("Error: " . $message);
     $this->terminateAbnormally($message);
 }
開發者ID:hadrienl,項目名稱:jelix,代碼行數:6,代碼來源:junit_xml_reporter.php

示例14: paintError

 /**
  *    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";
     }
 }
開發者ID:GerHobbelt,項目名稱:simpletest,代碼行數:17,代碼來源:reporter.php

示例15: paintError

 /**
  * 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(" -&gt; ", $breadcrumb) . "</div>\n";
     echo "</li>\n";
 }
開發者ID:codegooglecom,項目名稱:ypanel,代碼行數:16,代碼來源:cake_reporter.php


注:本文中的SimpleReporter::paintError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。