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


PHP PHPUnit_Framework_TestSuite::setName方法代码示例

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


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

示例1: suite

 public static function suite()
 {
     $suite = new \PHPUnit_Framework_TestSuite();
     $suite->setName('Xiaoju kozacy redis lib tests');
     $suite->addTestSuite('Xiaoju\\Beatles\\Utils\\Utest\\RedisTest');
     return $suite;
 }
开发者ID:Whispersong,项目名称:phputils,代码行数:7,代码来源:redistest.php

示例2: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('SGL2');
     $suite->addTestSuite('VariousTest');
     return $suite;
 }
开发者ID:biGGs24,项目名称:sgl2,代码行数:7,代码来源:AllTests.php

示例3: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('Shindig');
     $path = dirname($_SERVER['SCRIPT_FILENAME']);
     $testTypes = array('common', 'gadgets', 'social');
     foreach ($testTypes as $type) {
         if (isset($_GET['test'])) {
             $file_array = glob("{$path}/{$type}/{$_GET['test']}.php");
             if (isset($file_array[0]) && is_readable($file_array[0])) {
                 require_once $file_array[0];
                 $className = $_GET['test'];
                 $suite->addTestSuite($className);
             }
         } else {
             foreach (glob("{$path}/{$type}/*Test.php") as $file) {
                 if (is_readable($file)) {
                     require_once $file;
                     $className = str_replace('.php', '', basename($file));
                     $suite->addTestSuite($className);
                 }
             }
         }
     }
     return $suite;
 }
开发者ID:emma5021,项目名称:toba,代码行数:26,代码来源:index.php

示例4: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('AllTests');
     $suite->addTestSuite(OfflineTests::suite());
     return $suite;
 }
开发者ID:vznet,项目名称:vz_os_clientlibrary_php,代码行数:7,代码来源:AllTests.php

示例5: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('All Google Identity Toolkit PHP Client tests');
     $suite->addTestSuite('GitkitClientTest');
     $suite->addTestSuite('RpcHelperTest');
     return $suite;
 }
开发者ID:google,项目名称:identity-toolkit-php-client,代码行数:8,代码来源:AllTests.php

示例6: suite

 public static function suite()
 {
     $suite = new \PHPUnit_Framework_TestSuite();
     $suite->setName("All Tests");
     $suite->addTestSuite("Exercise\\Tests\\TestStringHelper");
     $suite->addTestSuite("Exercise\\Tests\\TestTravelersRepository");
     return $suite;
 }
开发者ID:bakl,项目名称:exercise,代码行数:8,代码来源:AllTests.php

示例7: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('All Google API PHP Client tests');
     $suite->addTestSuite(BuzzTests::suite());
     $suite->addTestSuite(GeneralTests::suite());
     return $suite;
 }
开发者ID:wty717,项目名称:heka-interactive-google-buzz-app,代码行数:8,代码来源:AllTests.php

示例8: makeSuite

 protected static function makeSuite($className, $group = null)
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName($className);
     $class = new ReflectionClass($className);
     foreach (self::$engineConfigurations as $engineName => $opts) {
         if ($group !== null && $group !== $engineName) {
             continue;
         }
         try {
             $parser = new Parser();
             $parser->startExternalParse(Title::newMainPage(), new ParserOptions(), Parser::OT_HTML, true);
             $engineClass = "Scribunto_{$engineName}Engine";
             $engine = new $engineClass(self::$engineConfigurations[$engineName] + array('parser' => $parser));
             $parser->scribunto_engine = $engine;
             $engine->setTitle($parser->getTitle());
             $engine->getInterpreter();
         } catch (Scribunto_LuaInterpreterNotFoundError $e) {
             $suite->addTest(new Scribunto_LuaEngineTestSkip($className, "interpreter for {$engineName} is not available"), array('Lua', $engineName));
             continue;
         }
         // Work around PHPUnit breakage: the only straightforward way to
         // get the data provider is to call
         // PHPUnit_Util_Test::getProvidedData, but that instantiates the
         // class without passing any parameters to the constructor. But we
         // *need* that engine name.
         self::$staticEngineName = $engineName;
         $engineSuite = new PHPUnit_Framework_TestSuite();
         $engineSuite->setName("{$engineName}: {$className}");
         foreach ($class->getMethods() as $method) {
             if (PHPUnit_Framework_TestSuite::isTestMethod($method) && $method->isPublic()) {
                 $name = $method->getName();
                 $groups = PHPUnit_Util_Test::getGroups($className, $name);
                 $groups[] = 'Lua';
                 $groups[] = $engineName;
                 $groups = array_unique($groups);
                 $data = PHPUnit_Util_Test::getProvidedData($className, $name);
                 if (is_array($data) || $data instanceof Iterator) {
                     // with @dataProvider
                     $dataSuite = new PHPUnit_Framework_TestSuite_DataProvider($className . '::' . $name);
                     foreach ($data as $k => $v) {
                         $dataSuite->addTest(new $className($name, $v, $k, $engineName), $groups);
                     }
                     $engineSuite->addTest($dataSuite);
                 } elseif ($data === false) {
                     // invalid @dataProvider
                     $engineSuite->addTest(new PHPUnit_Framework_Warning("The data provider specified for {$className}::{$name} is invalid."));
                 } else {
                     // no @dataProvider
                     $engineSuite->addTest(new $className($name, array(), '', $engineName), $groups);
                 }
             }
         }
         $suite->addTest($engineSuite);
     }
     return $suite;
 }
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:57,代码来源:LuaEngineTestBase.php

示例9: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('SimplePie');
     $suite->addTestSuite('EncodingTest');
     $suite->addTestSuite('IRITest');
     $suite->addTestSuite('LocatorTest');
     $suite->addTestSuite('OldTest');
     return $suite;
 }
开发者ID:navitronic,项目名称:simplepie,代码行数:10,代码来源:AllTests.php

示例10: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('All Google API PHP Client tests');
     $suite->addTestSuite(AllTasksTests::suite());
     $suite->addTestSuite(AllPageSpeedTests::suite());
     $suite->addTestSuite(AllUrlShortenerTests::suite());
     $suite->addTestSuite(GeneralTests::suite());
     return $suite;
 }
开发者ID:ateliee,项目名称:php_lib,代码行数:10,代码来源:AllTests.php

示例11: suite

 public static function suite($className)
 {
     global $wgInterwikiCache;
     if ($wgInterwikiCache) {
         $suite = new PHPUnit_Framework_TestSuite();
         $suite->setName($className);
         $suite->addTest(new Scribunto_LuaEngineTestSkip($className, 'Cannot run TitleLibrary tests when $wgInterwikiCache is set'), array('Lua'));
         return $suite;
     }
     return parent::suite($className);
 }
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:11,代码来源:TitleLibraryTest.php

示例12: suite

 public static function suite()
 {
     $types = array('common', 'auth', 'io', 'model', 'providers', 'service', 'storage', 'logger');
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('OfflineTests');
     $path = realpath(dirname(__FILE__));
     foreach ($types as $type) {
         $suite->addTestFiles(glob("{$path}/{$type}/*Test.php"));
     }
     return $suite;
 }
开发者ID:serrg1994,项目名称:opensocial-php-client,代码行数:11,代码来源:OfflineTests.php

示例13: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName("SCA_SDOTestSuite");
     $suite->addTest(new PHPUnit_Framework_TestSuite("SDOAPITest"));
     $suite->addTest(new PHPUnit_Framework_TestSuite("XMLDASTest"));
     $suite->addTest(new PHPUnit_Framework_TestSuite("JsonDASTest"));
     $suite->addTest(SCA_TestSuite::suite());
     $suite->addTest(SDO_DAS_Relational_TestSuite::suite());
     return $suite;
 }
开发者ID:psagi,项目名称:sdo,代码行数:11,代码来源:TestSuite.php

示例14: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('Google Buzz API tests');
     $suite->addTestSuite('ActivitiesTest');
     $suite->addTestSuite('CommentsTest');
     $suite->addTestSuite('RelatedTest');
     $suite->addTestSuite('GroupsTest');
     $suite->addTestSuite('PeopleTest');
     $suite->addTestSuite('FeedsTest');
     return $suite;
 }
开发者ID:ateliee,项目名称:php_lib,代码行数:12,代码来源:BuzzTests.php

示例15: testExcuteSpecificTestCaseThreeLevel

 public function testExcuteSpecificTestCaseThreeLevel()
 {
     $suite = $this->suiteFactory('PHPUnit_Framework_TestCase');
     $test_runner = new PHPUnitTestRunner();
     $test_suite = new PHPUnit_Framework_TestSuite();
     $test_suite->setName('test_suite');
     $test_suite->addTest($suite);
     $tests = $suite->tests();
     $test = $tests[0];
     $test_runner->filterTests($test_suite, $test_suite->getName() . '.' . $suite->getName() . '.' . $test->getName());
     $this->assertInstanceOf('PHPUnit_Framework_TestCase', $test_suite);
 }
开发者ID:andizzle,项目名称:zapper,代码行数:12,代码来源:TestCasesTest.php


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