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


PHP PHPUnit_TextUI_ResultPrinter::endTest方法代码示例

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


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

示例1: endTest

 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float				  $time
  */
 public function endTest(\PHPUnit_Framework_Test $test, $time)
 {
     parent::endTest($test, $time);
     if ($test instanceof \Pagosoft\PSpec\Test) {
         $this->numAssertions += $test->getNumAssertions();
     }
 }
开发者ID:pago,项目名称:pantr,代码行数:13,代码来源:ResultPrinter.php

示例2: endTest

 public function endTest(\PHPUnit_Framework_Test $test, $time)
 {
     parent::endTest($test, $time);
     if ($this->debug) {
         foreach ($this->timeColors as $threshold => $color) {
             if ($time >= $threshold) {
                 $timeColor = $color;
                 break;
             }
         }
         $this->write(' ');
         $this->writeWithColor($timeColor, '[' . number_format($time, 3) . 's]', false);
         $this->write(' ');
         $this->writeWithColor('fg-cyan', \PHPUnit_Util_Test::describe($test), true);
     }
 }
开发者ID:diablomedia,项目名称:phpunit-pretty-printer,代码行数:16,代码来源:PrettyPrinter.php

示例3: endTest

 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if ($this->_verbose) {
         echo date('Y-m-d H:i:s') . ': finished ' . $test->toString() . " in {$time}\n\n";
     }
     $app = Kwf_Registry::get('config')->application->id;
     if (!file_exists("/www/testtimes/{$app}")) {
         mkdir("/www/testtimes/{$app}");
     }
     file_put_contents("/www/testtimes/{$app}/{$test->toString()}", $time);
     if ($this->_expectedTimes) {
         $this->_currentProgress += $this->_expectedTimes[$test->toString()];
         $this->_currentTest++;
     }
     return parent::endTest($test, $time);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:16,代码来源:ProgressResultPrinter.php

示例4: endTest

 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     $t = microtime(true) - $this->_timeStats['startTime'];
     if ($this->_timeStats['min'] > $t) {
         $this->_timeStats['min'] = $t;
     }
     if ($this->_timeStats['max'] < $t) {
         $this->_timeStats['max'] = $t;
         $this->_timeStats['slowest'] = $test->getName();
     }
     $this->_timeStats['avg'] = ($t + $this->_timeStats['avg'] * $this->_timeStats['cnt']) / ++$this->_timeStats['cnt'];
     parent::endTest($test, $time);
     if ($this->_blDBResetPerTest && !isset($test->blNoDbResetAfterTest)) {
         $this->_oDBMaintenance->restoreDB($this->_iDBChangeMode, $this->_iDBChangeOutput);
         echo "|";
     }
 }
开发者ID:OXIDprojects,项目名称:debugax,代码行数:17,代码来源:oxPrinter.php

示例5: endTest

 /**
  * A test ended.
  *
  * @param PHPUnit_Framework_Test $test
  * @param float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     parent::endTest($test, $time);
     $this->printEvent('testFinished', ['name' => $test->getName(), 'duration' => (int) (round($time, 2) * 1000)]);
 }
开发者ID:phecho,项目名称:phpunit,代码行数:11,代码来源:TeamCity.php

示例6: endTest

 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$this->lastTestFailed) {
         $message = 'passed';
         $this->write($this->colors ? Stagehand_TestRunner_Coloring::green($message) : $message);
     }
     parent::endTest($test, $time);
     $this->lastEvent = PHPUnit_TextUI_ResultPrinter::EVENT_TEST_END;
 }
开发者ID:nojimage,项目名称:stagehand-testrunner,代码行数:15,代码来源:DetailedProgressPrinter.php

示例7: endTest

 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     //echo __METHOD__.chr(10);
     if (!$this->lastTestFailed) {
         $this->printTestdox($test, 'X');
         $this->lastTestFailed = true;
         // Make parent::endTest() shut up
     }
     parent::endTest($test, $time);
 }
开发者ID:ohaal,项目名称:selenium-zoetrope,代码行数:16,代码来源:PHPUnitTestListenerTestdox.php

示例8: endTest

 /**
  * A test ended.
  *
  * @param PHPUnit_Framework_Test $test
  * @param float $time
  * @return void
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (method_exists($test, 'getMessages')) {
         foreach ($test->getMessages() as $testMessage) {
             $testMessage = sprintf("%s  [%s]", str_repeat('  ', $this->level), $testMessage);
             $this->write($testMessage . "\n");
         }
     }
     if (!$this->lastTestFailed) {
         $message = sprintf("%s  SUCCESS. (Duration: %s sec)", str_repeat('  ', $this->level), $this->getDuration());
         if ($this->colors) {
             $this->write("[32;1m{$message}[0m" . "\n");
         } else {
             $this->write($message . "\n");
         }
     }
     $this->level--;
     return parent::endTest($test, $time);
 }
开发者ID:aoemedia,项目名称:menta,代码行数:26,代码来源:VerboseResultPrinter.php

示例9: endTest

 /**
  * A test ended.
  *
  * @param PHPUnit_Framework_Test $test
  * @param float $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     parent::endTest($test, $time);
     wfDebugLog($this->logChannel, 'End test ' . $this->getTestName($test));
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:11,代码来源:MediaWikiPHPUnitTestListener.php

示例10: endTest

 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$this->lastTestFailed) {
         $message = 'passed';
         $this->write($this->colors ? Stagehand_TestRunner_Coloring::green($message) : $message);
     }
     parent::endTest($test, $time);
 }
开发者ID:kumatch,项目名称:stagehand-testrunner,代码行数:14,代码来源:DetailedProgressPrinter.php

示例11: endTest

 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$this->colors) {
         parent::endTest($test, $time);
         return;
     }
     if (!$this->lastTestFailed) {
         $this->writeProgress(Stagehand_TestRunner_Coloring::green('.'));
     }
     if ($test instanceof PHPUnit_Framework_TestCase) {
         $this->numAssertions += $test->getNumAssertions();
     }
     $this->lastEvent = self::EVENT_TEST_END;
     $this->lastTestFailed = false;
 }
开发者ID:rsky,项目名称:makegood,代码行数:21,代码来源:ProgressPrinter.php

示例12: endTest

 /**
  * {@inheritdoc}
  */
 public function endTest(\PHPUnit_Framework_Test $test, $time)
 {
     if ($this->debug) {
         return parent::endTest($test, $time);
     }
     if (!$this->lastTestFailed) {
         $this->writeProgress('pass');
     }
     if ($test instanceof \PHPUnit_Framework_TestCase) {
         $this->numAssertions += $test->getNumAssertions();
     } else {
         if ($test instanceof \PHPUnit_Extensions_PhptTestCase) {
             $this->numAssertions++;
         }
     }
     $this->lastTestFailed = FALSE;
 }
开发者ID:whatthejeff,项目名称:nyancat-phpunit-resultprinter,代码行数:20,代码来源:ResultPrinter.php

示例13: endTest

 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     echo "\n" . date('Y-m-d H:i:s') . ': finished ' . $test->toString() . " in {$time}\n";
     return parent::endTest($test, $time);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:5,代码来源:VerboseResultPrinter.php


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