本文整理汇总了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;
}
示例2: suite
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite();
$suite->setName('SGL2');
$suite->addTestSuite('VariousTest');
return $suite;
}
示例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;
}
示例4: suite
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite();
$suite->setName('AllTests');
$suite->addTestSuite(OfflineTests::suite());
return $suite;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}