当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPUnit_Framework_TestFailure::failedTest方法代码示例

本文整理汇总了PHP中PHPUnit_Framework_TestFailure::failedTest方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_TestFailure::failedTest方法的具体用法?PHP PHPUnit_Framework_TestFailure::failedTest怎么用?PHP PHPUnit_Framework_TestFailure::failedTest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPUnit_Framework_TestFailure的用法示例。


在下文中一共展示了PHPUnit_Framework_TestFailure::failedTest方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: printDefect

 protected function printDefect(\PHPUnit_Framework_TestFailure $defect, $count)
 {
     $failedTest = $defect->failedTest();
     if (!$failedTest instanceof \Codeception\TestCase) {
         return parent::printDefect($defect, $count);
     }
     $this->dispatcher->dispatch('fail.print', new \Codeception\Event\Fail($defect->failedTest(), $defect->thrownException()));
 }
开发者ID:BatVane,项目名称:Codeception,代码行数:8,代码来源:UI.php

示例2: printDefectHeader

 /**
  * @param \PHPUnit_Framework_TestFailure $defect
  * @param integer                       $count
  */
 protected function printDefectHeader(\PHPUnit_Framework_TestFailure $defect, $count)
 {
     $failedTest = $defect->failedTest();
     if ($failedTest instanceof \PHPUnit_Framework_SelfDescribing) {
         $testName = $failedTest->toString();
     } else {
         $testName = get_class($failedTest);
     }
     $buffer = sprintf("\n%d) %s\n", $count, $testName);
     $this->write($buffer);
     $this->writeResults($buffer);
 }
开发者ID:psychomieze,项目名称:parallel-phpunit-resultprinter,代码行数:16,代码来源:ResultPrinter.php

示例3: printDefect

 protected function printDefect(\PHPUnit_Framework_TestFailure $defect, $count)
 {
     $this->write("\n---------\n");
     $this->dispatcher->dispatch(Events::TEST_FAIL_PRINT, new FailEvent($defect->failedTest(), $defect->thrownException(), $count));
 }
开发者ID:itillawarra,项目名称:cmfive,代码行数:5,代码来源:UI.php

示例4: printDefectHeader

 /**
  * @param  PHPUnit_Framework_TestFailure $defect
  * @param  integer                       $count
  * @param  boolean                       $failOrError
  */
 protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $count, $failOrError = true)
 {
     $failedTest = $defect->failedTest();
     if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
         $testName = $failedTest->toString();
     } else {
         $testName = get_class($failedTest);
     }
     if ($failOrError) {
         $this->write(sprintf("\n  %d) %s", $count, $testName));
     } else {
         $this->write(sprintf("  %s", $this->yellow($testName)));
     }
 }
开发者ID:joskfg,项目名称:guard-phpunit2,代码行数:19,代码来源:ResultPrinter.php

示例5: printDefectHeader

 /**
  * @param  PHPUnit_Framework_TestFailure $defect
  * @param  integer                       $count
  * @access protected
  */
 protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect)
 {
     $failedTest = $defect->failedTest();
     if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
         $testName = $failedTest->toString();
     } else {
         $testName = get_class($failedTest);
     }
     $this->write("<name>{$testName}</name>");
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:15,代码来源:CopixTestXMLPrinter.class.php

示例6: printDefect

 protected function printDefect(\PHPUnit_Framework_TestFailure $defect, $count)
 {
     $this->write("\n---------\n");
     $this->dispatcher->dispatch('test.fail.print', new \Codeception\Event\Fail($defect->failedTest(), $defect->thrownException(), $count));
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:5,代码来源:UI.php

示例7: printDefectHeader

 /**
  * @param  PHPUnit_Framework_TestFailure $defect
  * @param  integer                       $count
  * @access protected
  */
 protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $count)
 {
     $failedTest = $defect->failedTest();
     if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
         $testName = $failedTest->toString();
     } else {
         $testName = get_class($failedTest);
     }
     $this->write(sprintf("<table class='CopixTable'><tr><td>%d</td><td> %s</td></tr>", $count, $testName));
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:15,代码来源:CopixTestPrinter.class.php

示例8: printDefectHeader

 /**
  * @param  PHPUnit_Framework_TestFailure $defect
  * @param  integer                       $count
  * @access protected
  */
 protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $count)
 {
     $name = $defect->failedTest()->getName();
     if ($name == null) {
         $class = new Reflection_Class($defect->failedTest());
         $name = $class->name;
     }
     printf("%d) %s\n", $count, $name);
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:14,代码来源:ResultPrinter.php


注:本文中的PHPUnit_Framework_TestFailure::failedTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。