setName() public method

Sets the name of the suite.
public setName ( $name )
Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('SGL2');
     $suite->addTestSuite('VariousTest');
     return $suite;
 }
Ejemplo n.º 3
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('AllTests');
     $suite->addTestSuite("FS_GameTest");
     return $suite;
 }
Ejemplo n.º 4
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('Google PageSpeed API tests');
     $suite->addTestSuite('PageSpeedTest');
     return $suite;
 }
Ejemplo n.º 5
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('AdSense Management API tests');
     $suite->addTestSuite('AdSenseManagementTest');
     return $suite;
 }
Ejemplo n.º 6
0
 public static function suite()
 {
     $suite = new \PHPUnit_Framework_TestSuite();
     $suite->setName('Xiaoju kozacy logger helper tests');
     $suite->addTestSuite('Xiaoju\\Beatles\\Utils\\Utest\\LoggerTest');
     return $suite;
 }
Ejemplo n.º 7
0
 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;
 }
Ejemplo n.º 8
0
 public static function suite()
 {
     $suite = new \PHPUnit_Framework_TestSuite();
     $suite->setName('Xiaoju kozacy argumentvalidator helper tests');
     $suite->addTestSuite('Xiaoju\\Beatles\\Utils\\Utest\\ArgumentValidatorTest');
     return $suite;
 }
Ejemplo n.º 9
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('AllTests');
     $suite->addTestSuite(OfflineTests::suite());
     return $suite;
 }
Ejemplo n.º 10
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('Google UrlShortener API tests');
     $suite->addTestSuite('UrlShortenerTests');
     return $suite;
 }
Ejemplo n.º 11
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('Google YouTube API tests');
     $suite->addTestSuite('YouTubeTest');
     return $suite;
 }
Ejemplo n.º 12
0
 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;
 }
Ejemplo n.º 13
0
 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;
 }
 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;
 }
Ejemplo n.º 15
0
 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;
 }
Ejemplo n.º 16
0
 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;
 }
Ejemplo n.º 17
0
 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;
 }
Ejemplo n.º 18
0
 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);
 }
 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;
 }
Ejemplo n.º 20
0
 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;
 }
Ejemplo n.º 21
0
 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;
 }
Ejemplo n.º 22
0
 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);
 }
Ejemplo n.º 23
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('SXE');
     foreach (glob(dirname(__FILE__) . '/*.php') as $filepath) {
         $name = basename($filepath, '.php');
         if ($name != 'AllTests') {
             $suite->addTestFile($filepath);
         }
     }
     return $suite;
 }
Ejemplo n.º 24
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName(__CLASS__);
     $suite->addTestSuite('Miao_Office_Exception_Test');
     $suite->addTestSuite('Miao_Office_Request_Test');
     $suite->addTestSuite('Miao_Office_TemplatesEngine_PhpNative_Test');
     $suite->addTestSuite('Miao_Office_ViewBlock_Test');
     $suite->addTestSuite('Miao_Office_Factory_Test');
     $suite->addTestSuite('Miao_Office_Header_Test');
     return $suite;
 }
Ejemplo n.º 25
0
 public static function suite()
 {
     PHPUnit_Util_Filter::addDirectoryToFilter(dirname(__FILE__));
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('SimpleDOM');
     foreach (glob(dirname(__FILE__) . '/*.php') as $filepath) {
         $name = basename($filepath, '.php');
         if ($name != 'AllTests') {
             $suite->addTestFile($filepath);
         }
     }
     return $suite;
 }
Ejemplo n.º 26
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('AllTests');
     $suite->addTestSuite("FenTest");
     $suite->addTestSuite("GameTest");
     $suite->addTestSuite("MetadataTest");
     $suite->addTestSuite("PlayerTest");
     $suite->addTestSuite("SeekTest");
     $suite->addTestSuite("ImportTest");
     $suite->addTestSuite("SessionTest");
     $suite->addTestSuite("EloTest");
     return $suite;
 }
Ejemplo n.º 27
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('All Google API PHP Client tests');
     // TODO(slangley): Enable all of these tests - They do not work as part of
     // the download and we need them before we can ship this in the SDK.
     //$suite->addTestSuite(AllTasksTests::suite());
     //$suite->addTestSuite(AllPageSpeedTests::suite());
     //$suite->addTestSuite(AllUrlShortenerTests::suite());
     //$suite->addTestSuite(AllPlusTests::suite());
     //$suite->addTestSuite(AdsenseTests::suite());
     $suite->addTestSuite(GeneralTests::suite());
     return $suite;
 }
Ejemplo n.º 28
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->setName('OnlineTests');
     $suite->addTestSuite(new OrkutSandboxRpcTests());
     $suite->addTestSuite(new OrkutSandboxRestTests());
     $suite->addTestSuite(new GoogleRpcTests());
     $suite->addTestSuite(new GoogleRestTests());
     $suite->addTestSuite(new PartuzaRpcTests());
     $suite->addTestSuite(new PartuzaRestTests());
     $suite->addTestSuite(new FriendConnectRestTests());
     $suite->addTestSuite(new MySpaceTests());
     $suite->addTestSuite(new PlaxoRestTests());
     return $suite;
 }
Ejemplo n.º 29
0
function makeSuite($class_name)
{
    $test = new $class_name($class_name);
    if (is_a($test, 'PHPUnit_Framework_TestCase')) {
        $s = new PHPUnit_Framework_TestSuite();
        $s->setName($class_name);
        $s->addTestSuite($class_name);
        $test = $s;
    }
    $tc_array_name = $class_name . '_other';
    if (array_key_exists($tc_array_name, $GLOBALS) && is_array($GLOBALS[$tc_array_name])) {
        foreach ($GLOBALS[$tc_array_name] as $tc) {
            $test->addTestSuite(get_class($tc));
        }
    }
    return $test;
}
Ejemplo n.º 30
0
 public static function suite()
 {
     $suite = new \PHPUnit_Framework_TestSuite();
     $suite->setName('All Xiaoju Beatles utils tests');
     $suite->addTestSuite(RouterTests::suite());
     $suite->addTestSuite(UriTests::suite());
     $suite->addTestSuite(LoggerTests::suite());
     $suite->addTestSuite(ValidatorTests::suite());
     $suite->addTestSuite(HttpRequestTests::suite());
     $suite->addTestSuite(ArgumentValidatorTests::suite());
     $suite->addTestSuite(AuthenticationTests::suite());
     $suite->addTestSuite(FormatterTests::suite());
     $suite->addTestSuite(RedisTests::suite());
     $suite->addTestSuite(MemcacheTests::suite());
     $suite->addTestSuite(MysqlTests::suite());
     return $suite;
 }