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


PHP PHPUnit_Util_Configuration::getPHPUnitConfiguration方法代碼示例

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


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

示例1: bootstrap

 private function bootstrap(InputInterface $input, \PHPUnit_Util_Configuration $config)
 {
     $bootstrap = $input->getOption('bootstrap');
     if (!$bootstrap && isset($config->getPHPUnitConfiguration()['bootstrap'])) {
         $bootstrap = $config->getPHPUnitConfiguration()['bootstrap'];
     }
     if ($bootstrap) {
         putenv('PHPUNIT_PARALLEL=master');
         dont_leak_env_and_include($bootstrap);
     }
 }
開發者ID:vektah,項目名稱:phpunit-parallel,代碼行數:11,代碼來源:PhpunitParallel.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


//.........這裏部分代碼省略.........
             case '--skeleton-test':
                 if (isset($arguments['test']) && $arguments['test'] !== FALSE) {
                     PHPUnit_TextUI_TestRunner::printVersionString();
                     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';
                     }
                     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['configuration']) && file_exists('phpunit.xml')) {
         $arguments['configuration'] = realpath('phpunit.xml');
     }
     if (isset($arguments['configuration'])) {
         $configuration = new PHPUnit_Util_Configuration($arguments['configuration']);
         $browsers = $configuration->getSeleniumBrowserConfiguration();
         if (!empty($browsers)) {
             require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
             PHPUnit_Extensions_SeleniumTestCase::$browsers = $browsers;
         }
         if (!isset($arguments['test'])) {
             $configuration->handlePHPConfiguration();
             if (!isset($arguments['bootstrap'])) {
                 $phpunitConfiguration = $configuration->getPHPUnitConfiguration();
                 if (isset($phpunitConfiguration['bootstrap'])) {
                     PHPUnit_Util_Fileloader::load($phpunitConfiguration['bootstrap']);
                 }
             }
             $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:cjmi,項目名稱:miniblog,代碼行數:101,代碼來源:Command.php

示例4: earlyConfigure

 /**
  * @param \PHPUnit_Util_Configuration $configuration $configuration
  *
  * @since Method available since Release 2.16.0
  */
 protected function earlyConfigure(\PHPUnit_Util_Configuration $configuration)
 {
     $configuration->handlePHPConfiguration();
     $phpunitConfiguration = $configuration->getPHPUnitConfiguration();
     if (array_key_exists('bootstrap', $phpunitConfiguration)) {
         if (array_key_exists('syntaxCheck', $phpunitConfiguration)) {
             $this->handleBootstrap($phpunitConfiguration['bootstrap'], $phpunitConfiguration['syntaxCheck']);
         } else {
             $this->handleBootstrap($phpunitConfiguration['bootstrap']);
         }
     }
     if (array_key_exists('colors', $phpunitConfiguration)) {
         $this->terminal->setColor($phpunitConfiguration['colors']);
     }
     if (method_exists($configuration, 'getSeleniumBrowserConfiguration') && class_exists('PHPUnit_Extensions_SeleniumTestCase')) {
         $seleniumBrowserConfiguration = $configuration->getSeleniumBrowserConfiguration();
         if (count($seleniumBrowserConfiguration) > 0) {
             \PHPUnit_Extensions_SeleniumTestCase::$browsers = $seleniumBrowserConfiguration;
         }
     }
 }
開發者ID:piece,項目名稱:stagehand-testrunner,代碼行數:26,代碼來源:PHPUnitPreparer.php


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