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


PHP PHPUnit_Framework_TestSuite::count方法代码示例

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


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

示例1: startTestSuite

 /**
  * A test suite started.
  *
  * @param \PHPUnit_Framework_TestSuite $suite
  *
  * @return void
  */
 public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
 {
     $suiteName = $suite->getName();
     $testCount = $suite->count();
     $context = array('suiteName' => $suiteName, 'testCount' => $testCount, 'operation' => __FUNCTION__);
     $this->suites[] = $suiteName;
     $this->stats[$suiteName] = array('tests' => 0, 'assertions' => 0, 'failures' => 0, 'errors' => 0, 'incompletes' => 0, 'skips' => 0, 'risky' => 0);
     $this->logger->notice(sprintf("TestSuite '%s' started with %d tests.", $suiteName, $testCount), $context);
 }
开发者ID:jclaveau,项目名称:phpunit-LoggerTestListener,代码行数:16,代码来源:AbstractLoggerTestListener.php

示例2: buildAndAddSuiteFromDirectory2

 public static function buildAndAddSuiteFromDirectory2($parentSuite, $name, $directoryName, $whatToTest)
 {
     assert('is_string($directoryName) && $directoryName != ""');
     if (is_dir($directoryName)) {
         $suite = new PHPUnit_Framework_TestSuite();
         $suite->setName(ucfirst($name) . ' Tests');
         $fileNames = scandir($directoryName);
         foreach ($fileNames as $fileName) {
             if (substr($fileName, strlen($fileName) - strlen('Test.php')) == 'Test.php') {
                 require_once "{$directoryName}/{$fileName}";
                 $className = substr($fileName, 0, strlen($fileName) - 4);
                 if (substr($className, strlen($className) - 8) != 'BaseTest') {
                     if ($whatToTest == 'All' || $whatToTest == 'Framework' && $name == 'Framework' || $whatToTest == 'Misc' && $name == 'Misc' || $whatToTest == 'BadDependencies' && $name == 'BadDependencies' || $whatToTest == $name || $whatToTest == $className) {
                         if (@class_exists($className, false)) {
                             $suite->addTestSuite(new PHPUnit_Framework_TestSuite($className));
                             static::resolveDependentTestModelClassNamesForClass($className, $directoryName);
                         }
                     }
                 }
             }
         }
         if ($suite->count() > 0) {
             $parentSuite->addTestSuite($suite);
         }
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:TestSuite.php

示例3: runAllTests

 /**
  * Runs all tests.
  *
  * @param PHPUnit_Framework_TestSuite $testSuiteWithAllTestCases suite with all test cases
  * @param PHPUnit_Framework_TestResult $testResult the test result (will be modified)
  *
  * @return void
  */
 protected function runAllTests(PHPUnit_Framework_TestSuite $testSuiteWithAllTestCases, PHPUnit_Framework_TestResult $testResult)
 {
     $this->testListener->setTotalNumberOfTests($testSuiteWithAllTestCases->count());
     $this->renderProgressbar();
     $testSuiteWithAllTestCases->run($testResult);
 }
开发者ID:chrmue01,项目名称:typo3-starter-kit,代码行数:14,代码来源:Module.php


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