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


PHP TestSuite::addTestSuite方法代码示例

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


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

示例1: suite

 public static function suite()
 {
     $suite = new TestSuite('Haanga test suite');
     $suite->addTestSuite('templateTest');
     $suite->addTestSuite('errorTest');
     return $suite;
 }
开发者ID:narock,项目名称:lodspeakr,代码行数:7,代码来源:TestSuite.php

示例2: suite

 public static function suite()
 {
     $suite = new TestSuite('AmpolirosCore');
     $suite->addTestSuite(new ReflectionClass('AmpolirosTest'));
     $suite->addTestSuite(new ReflectionClass('AmpConfigTest'));
     return $suite;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:7,代码来源:AllAmpolirosCoreTests.php

示例3: addTestSuite

 /**
  * Add child TestSuite to the provided TestSuite from the XML node
  *
  * @param TestSuite         $testSuite
  * @param \SimpleXMLElement $xml
  */
 public function addTestSuite(TestSuite $testSuite, \SimpleXMLElement $xml)
 {
     foreach ($xml->xpath('./testsuite') as $element) {
         $suite = new TestSuite((string) $element['name'], (string) $element['file'], (string) $element['namespace'], (string) $element['fullPackage']);
         $this->addTestCase($suite, $element);
         $this->addTestSuite($suite, $element);
         $testSuite->addTestSuite($suite);
     }
 }
开发者ID:sonata-project,项目名称:composer-archive-creator,代码行数:15,代码来源:PHPUnitLoader.php

示例4: merge

 /**
  * @param \Iterator $files
  * @param TestSuite $testSuite
  *
  * @return TestSuite
  */
 public function merge(\Iterator $files, TestSuite $testSuite = null)
 {
     if (!$testSuite) {
         $testSuite = new TestSuite(null, null, null, null);
     }
     $loader = new PHPUnitLoader();
     foreach ($files as $file) {
         $suite = $loader->load($file->getContents());
         if (!$suite) {
             continue;
         }
         $testSuite->addTestSuite($suite);
     }
     return $testSuite;
 }
开发者ID:sonata-project,项目名称:composer-archive-creator,代码行数:21,代码来源:JUnitMerger.php

示例5: suite

 public static function suite()
 {
     $suite = new TestSuite('AmpolirosDatatransfer');
     $suite->addTestSuite(new ReflectionClass('ClipboardTest'));
     return $suite;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:6,代码来源:AllAmpolirosDatatransferTests.php

示例6: suite

 public static function suite()
 {
     $suite = new TestSuite('onPHP-' . ONPHP_VERSION);
     foreach (self::$paths as $testPath) {
         foreach (glob($testPath . '*Test' . EXT_CLASS, GLOB_BRACE) as $file) {
             $suite->addTestFile($file);
         }
     }
     // meta, DB and DAOs ordered tests portion
     if (self::$dbs) {
         try {
             Singleton::getInstance('DBTestPool', self::$dbs)->connect();
         } catch (Exception $e) {
             Singleton::dropInstance('DBTestPool');
             Singleton::getInstance('DBTestPool');
         }
         // build stuff from meta
         $metaDir = ONPHP_TEST_PATH . 'meta' . DIRECTORY_SEPARATOR;
         $path = ONPHP_META_PATH . 'bin' . DIRECTORY_SEPARATOR . 'build.php';
         $_SERVER['argv'] = array();
         $_SERVER['argv'][0] = $path;
         $_SERVER['argv'][1] = $metaDir . 'config.inc.php';
         $_SERVER['argv'][2] = $metaDir . 'config.meta.xml';
         $_SERVER['argv'][] = '--force';
         $_SERVER['argv'][] = '--no-schema-check';
         $_SERVER['argv'][] = '--drop-stale-files';
         include $path;
         // provide paths to autogenerated stuff
         set_include_path(get_include_path() . PATH_SEPARATOR . ONPHP_META_AUTO_BUSINESS_DIR . PATH_SEPARATOR . ONPHP_META_AUTO_DAO_DIR . PATH_SEPARATOR . ONPHP_META_AUTO_PROTO_DIR . PATH_SEPARATOR . ONPHP_META_DAO_DIR . PATH_SEPARATOR . ONPHP_META_BUSINESS_DIR . PATH_SEPARATOR . ONPHP_META_PROTO_DIR);
         $daoTest = new DAOTest();
         $out = MetaConfiguration::me()->getOutput();
         foreach (DBTestPool::me()->getPool() as $connector => $db) {
             DBPool::me()->setDefault($db);
             $out->info('Using ')->info(get_class($db), true)->infoLine(' connector.');
             try {
                 $daoTest->drop();
             } catch (DatabaseException $e) {
                 // previous shutdown was clean
             }
             $daoTest->create()->fill(false);
             MetaConfiguration::me()->checkIntegrity();
             $out->newLine();
             $daoTest->drop();
         }
         DBPool::me()->dropDefault();
     }
     $suite->addTestSuite('DAOTest');
     return $suite;
 }
开发者ID:rero26,项目名称:onphp-framework,代码行数:49,代码来源:AllTests.php


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