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


PHP PHPUnit_Util_Configuration::getTestSuiteConfiguration方法代码示例

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


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

示例1: __construct

 public function __construct($theClass = '', $name = '')
 {
     $this->setName(get_class($this));
     $zendPath = getCwd();
     chdir(realpath(dirname(__FILE__)));
     require_once 'PHPUnit/Util/Configuration.php';
     // test phpUnit version
     if (version_compare(PHPUnit_Runner_Version::id(), '3.4', '>=')) {
         $configuration = PHPUnit_Util_Configuration::getInstance('phpunit.xml');
     } else {
         $configuration = new PHPUnit_Util_Configuration('phpunit.xml');
     }
     $testSuite = $configuration->getTestSuiteConfiguration(false);
     chdir($zendPath);
     foreach ($testSuite->tests() as $test) {
         if (!$test instanceof PHPUnit_Framework_Warning) {
             $this->addTestSuite($test);
         }
     }
 }
开发者ID:r-kovalenko,项目名称:Rediska,代码行数:20,代码来源:bootstrap.php

示例2: assertConfigurationEquals

 /**
  * Asserts that the values in $actualConfiguration equal $expectedConfiguration.
  *
  * @param PHPUnit_Util_Configuration $expectedConfiguration
  * @param PHPUnit_Util_Configuration $actualConfiguration
  */
 protected function assertConfigurationEquals(PHPUnit_Util_Configuration $expectedConfiguration, PHPUnit_Util_Configuration $actualConfiguration)
 {
     $this->assertEquals($expectedConfiguration->getFilterConfiguration(), $actualConfiguration->getFilterConfiguration());
     $this->assertEquals($expectedConfiguration->getGroupConfiguration(), $actualConfiguration->getGroupConfiguration());
     $this->assertEquals($expectedConfiguration->getListenerConfiguration(), $actualConfiguration->getListenerConfiguration());
     $this->assertEquals($expectedConfiguration->getLoggingConfiguration(), $actualConfiguration->getLoggingConfiguration());
     $this->assertEquals($expectedConfiguration->getPHPConfiguration(), $actualConfiguration->getPHPConfiguration());
     $this->assertEquals($expectedConfiguration->getPHPUnitConfiguration(), $actualConfiguration->getPHPUnitConfiguration());
     $this->assertEquals($expectedConfiguration->getTestSuiteConfiguration(), $actualConfiguration->getTestSuiteConfiguration());
 }
开发者ID:phecho,项目名称:phpunit,代码行数:16,代码来源:ConfigurationTest.php

示例3: handleArguments


//.........这里部分代码省略.........
                 } else {
                     self::showMissingDependency('The PDO extension is not loaded.');
                 }
                 break;
             case '--test-db-log-info':
                 if (extension_loaded('pdo')) {
                     $arguments['testDatabaseLogInfo'] = $option[1];
                 } else {
                     self::showMissingDependency('The PDO extension is not loaded.');
                 }
                 break;
             case '--skeleton':
             case '--skeleton-class':
             case '--skeleton-test':
                 if (isset($arguments['bootstrap'])) {
                     require_once $arguments['bootstrap'];
                 }
                 if ($option[0] == '--skeleton-class') {
                     require_once 'PHPUnit/Util/Skeleton/Class.php';
                     $class = 'PHPUnit_Util_Skeleton_Class';
                 } else {
                     require_once 'PHPUnit/Util/Skeleton/Test.php';
                     $class = 'PHPUnit_Util_Skeleton_Test';
                 }
                 if (isset($arguments['test']) && $arguments['test'] !== FALSE && isset($arguments['testFile'])) {
                     PHPUnit_TextUI_TestRunner::printVersionString();
                     try {
                         $skeleton = new $class($arguments['test'], $arguments['testFile']);
                         $skeleton->write();
                     } catch (Exception $e) {
                         print $e->getMessage() . "\n";
                         printf('Could not skeleton for "%s" to "%s".' . "\n", $skeleton->getOutClassName(), $skeleton->getOutSourceFile());
                         exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
                     }
                     printf('Wrote skeleton for "%s" to "%s".' . "\n", $skeleton->getOutClassName(), $skeleton->getOutSourceFile());
                     exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
                 } else {
                     self::showHelp();
                     exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
                 }
                 break;
             case '--tap':
                 require_once 'PHPUnit/Util/Log/TAP.php';
                 $arguments['printer'] = new PHPUnit_Util_Log_TAP();
                 break;
             case '--story':
                 require_once 'PHPUnit/Extensions/Story/ResultPrinter/Text.php';
                 $arguments['printer'] = new PHPUnit_Extensions_Story_ResultPrinter_Text();
                 break;
             case '--story-html':
                 $arguments['storyHTMLFile'] = $option[1];
                 break;
             case '--story-text':
                 $arguments['storyTextFile'] = $option[1];
                 break;
             case '--testdox':
                 require_once 'PHPUnit/Util/TestDox/ResultPrinter/Text.php';
                 $arguments['printer'] = new PHPUnit_Util_TestDox_ResultPrinter_Text();
                 break;
             case '--testdox-html':
                 $arguments['testdoxHTMLFile'] = $option[1];
                 break;
             case '--testdox-text':
                 $arguments['testdoxTextFile'] = $option[1];
                 break;
             case '--no-syntax-check':
                 $arguments['syntaxCheck'] = FALSE;
                 break;
             case '--verbose':
                 $arguments['verbose'] = TRUE;
                 break;
             case '--version':
                 PHPUnit_TextUI_TestRunner::printVersionString();
                 exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
                 break;
             case '--wait':
                 $arguments['wait'] = TRUE;
                 break;
         }
     }
     if (!isset($arguments['test']) && isset($arguments['configuration'])) {
         $configuration = new PHPUnit_Util_Configuration($arguments['configuration']);
         $configuration->handlePHPConfiguration();
         $testSuite = $configuration->getTestSuiteConfiguration();
         if ($testSuite !== NULL) {
             $arguments['test'] = $testSuite;
         }
     }
     if (isset($arguments['test']) && is_string($arguments['test']) && substr($arguments['test'], -5, 5) == '.phpt') {
         require_once 'PHPUnit/Extensions/PhptTestCase.php';
         $test = new PHPUnit_Extensions_PhptTestCase($arguments['test']);
         $arguments['test'] = new PHPUnit_Framework_TestSuite();
         $arguments['test']->addTest($test);
     }
     if (!isset($arguments['test']) || isset($arguments['testDatabaseLogRevision']) && !isset($arguments['testDatabaseDSN'])) {
         self::showHelp();
         exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
     }
     return $arguments;
 }
开发者ID:xiplias,项目名称:pails,代码行数:101,代码来源:Command.php

示例4: handleArguments


//.........这里部分代码省略.........
                     $arguments['filter'] = $option[1];
                 }
                 break;
             case '--group':
                 $arguments['groups'] = explode(',', $option[1]);
                 break;
             case '--exclude-group':
                 $arguments['excludeGroups'] = explode(',', $option[1]);
                 break;
             case '--loader':
                 self::handleLoader($option[1]);
                 break;
             case '--log-json':
                 $arguments['jsonLogfile'] = $option[1];
                 break;
             case '--log-graphviz':
                 $arguments['graphvizLogfile'] = $option[1];
                 break;
             case '--log-tap':
                 $arguments['tapLogfile'] = $option[1];
                 break;
             case '--log-xml':
                 $arguments['xmlLogfile'] = $option[1];
                 break;
             case '--log-pmd':
                 $arguments['pmdXML'] = $option[1];
                 break;
             case '--log-metrics':
                 $arguments['metricsXML'] = $option[1];
                 break;
             case '--repeat':
                 $arguments['repeat'] = (int) $option[1];
                 break;
             case '--stop-on-failure':
                 $arguments['stopOnFailure'] = TRUE;
                 break;
             case '--test-db-dsn':
                 $arguments['testDatabaseDSN'] = $option[1];
                 break;
             case '--test-db-log-rev':
                 $arguments['testDatabaseLogRevision'] = $option[1];
                 break;
             case '--test-db-prefix':
                 $arguments['testDatabasePrefix'] = $option[1];
                 break;
             case '--test-db-log-info':
                 $arguments['testDatabaseLogInfo'] = $option[1];
                 break;
             case '--coverage-html':
             case '--report':
                 $arguments['reportDirectory'] = $option[1];
                 break;
             case '--skeleton':
                 if (isset($arguments['test']) && isset($arguments['testFile'])) {
                     self::doSkeleton($arguments['test'], $arguments['testFile']);
                 } else {
                     self::showHelp();
                     exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
                 }
                 break;
             case '--tap':
                 $arguments['printer'] = new PHPUnit_Util_Log_TAP();
                 break;
             case '--testdox':
                 $arguments['printer'] = new PHPUnit_Util_TestDox_ResultPrinter_Text();
                 break;
             case '--testdox-html':
                 $arguments['testdoxHTMLFile'] = $option[1];
                 break;
             case '--testdox-text':
                 $arguments['testdoxTextFile'] = $option[1];
                 break;
             case '--no-syntax-check':
                 $arguments['syntaxCheck'] = FALSE;
                 break;
             case '--verbose':
                 $arguments['verbose'] = TRUE;
                 break;
             case '--version':
                 PHPUnit_TextUI_TestRunner::printVersionString();
                 exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
                 break;
             case '--wait':
                 $arguments['wait'] = TRUE;
                 break;
         }
     }
     if (!isset($arguments['test']) && isset($arguments['configuration'])) {
         $configuration = new PHPUnit_Util_Configuration($arguments['configuration']);
         $testSuite = $configuration->getTestSuiteConfiguration();
         if ($testSuite !== NULL) {
             $arguments['test'] = $testSuite;
         }
     }
     if (!isset($arguments['test']) || isset($arguments['testDatabaseLogRevision']) && !isset($arguments['testDatabaseDSN'])) {
         self::showHelp();
         exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
     }
     return $arguments;
 }
开发者ID:ahmedadham88,项目名称:enhanced-social-network,代码行数:101,代码来源:Command.php

示例5: getTestsFromConfig

 public function getTestsFromConfig(\PHPUnit_Util_Configuration $config)
 {
     return $this->enumerateTests($config->getTestSuiteConfiguration());
 }
开发者ID:vektah,项目名称:phpunit-parallel,代码行数:4,代码来源:TestLocator.php

示例6: loadSuite

 /**
  * Load test suite
  *
  * @param Configuration $configuration
  * @return TestSuite
  */
 public static function loadSuite(Configuration $configuration)
 {
     return $configuration->getTestSuiteConfiguration();
 }
开发者ID:ockcyp,项目名称:covers-validator,代码行数:10,代码来源:TestSuiteLoader.php


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