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


PHP PHPUnit_Framework_TestSuite::addTest方法代码示例

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


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

示例1: addCest

 public function addCest($file)
 {
     $name = $this->relativeName($file);
     $this->tests[$name] = $file;
     $loaded_classes = get_declared_classes();
     require_once $file;
     $extra_loaded_classes = get_declared_classes();
     $testClasses = array_diff($extra_loaded_classes, $loaded_classes);
     foreach ($testClasses as $testClass) {
         $unit = new $testClass();
         $reflected = new \ReflectionClass($testClass);
         $methods = $reflected->getMethods(\ReflectionMethod::IS_PUBLIC);
         foreach ($methods as $method) {
             if ($method->isConstructor()) {
                 continue;
             }
             if ($method->isDestructor()) {
                 continue;
             }
             if (isset($unit->class)) {
                 $target = $unit->class;
                 $target .= $method->isStatic() ? '::' . $method->name : '.' . $method->name;
             } else {
                 $target = get_class($unit) . '::' . $method->name;
             }
             $this->suite->addTest(new \Codeception\TestCase\Cest($this->dispatcher, array('name' => $name . ':' . $target, 'class' => $unit, 'method' => $method->name, 'static' => $method->isStatic(), 'signature' => $target, 'file' => $file, 'bootstrap' => $this->settings['bootstrap'])));
         }
     }
 }
开发者ID:nike-17,项目名称:Codeception,代码行数:29,代码来源:SuiteManager.php

示例2: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Suíte de testes do projeto (unitários e funcionais)');
     $suite->addTest(Unit_AllTests::suite());
     $suite->addTest(Functional_AllTests::suite());
     return $suite;
 }
开发者ID:secteofilandia,项目名称:ieducar,代码行数:7,代码来源:AllTests.php

示例3: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Centurion Suite');
     $suite->addTest(Centurion_AllTests::suite());
     $suite->addTest(Modules_AllTests::suite());
     return $suite;
 }
开发者ID:netconstructor,项目名称:Centurion,代码行数:7,代码来源:AllTests.php

示例4: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('ZFSTDE Blog Suite');
     $suite->addTest(ZFExt_Model_AllTests::suite());
     $suite->addTest(ZFExt_View_AllTests::suite());
     return $suite;
 }
开发者ID:padraic,项目名称:ZFBlog,代码行数:7,代码来源:AllTests.php

示例5: suite

 /**
  * Build the test suite.
  *
  * @return PHPUnit_Framework_TestSuite
  * @access public
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('VuFind - web');
     $suite->addTest(WebDriversAllTests::suite());
     $suite->addTest(WebSysAllTests::suite());
     return $suite;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:13,代码来源:AllTests.php

示例6: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->addTest(Test_Map_Match::suite());
     $suite->addTest(Test_Map_Destination::suite());
     return $suite;
 }
开发者ID:reoring,项目名称:sabel,代码行数:7,代码来源:Tests.php

示例7: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('PHPUnit');
     $suite->addTest(Phlickr_Tests_Offline_AllTests::suite());
     $suite->addTest(Phlickr_Tests_Online_AllTests::suite());
     return $suite;
 }
开发者ID:seeminglee,项目名称:smldata,代码行数:7,代码来源:AllTests.php

示例8: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('xPDOSuite');
     $suite->addTest(MODx_AllTests::suite());
     $suite->addTest(Processors_AllTests::suite());
     return $suite;
 }
开发者ID:JoeBlow,项目名称:revolution,代码行数:7,代码来源:MODxSuite_AllTests.php

示例9: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('OrangeHRM extractor unit tests');
     $suite->addTest(extractor_recruitment_AllTests::suite());
     $suite->addTest(extractor_eimadmin_AllTests::suite());
     return $suite;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:7,代码来源:AllTests.php

示例10: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Project');
     $suite->addTest(FourStore_TestsOffLine::suite());
     $suite->addTest(FourStore_TestsOnLine::suite());
     return $suite;
 }
开发者ID:BorderCloud,项目名称:4store-php,代码行数:7,代码来源:AllTests.php

示例11: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('WindFramework AllTest');
     $suite->addTest(AllBaseTest::suite());
     $suite->addTest(AllWebTest::suite());
     return $suite;
 }
开发者ID:jellycheng,项目名称:windframework,代码行数:7,代码来源:AllTest.php

示例12: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend');
     // place other tests here for incubator suite
     $suite->addTestSuite('Zend_AuthTest');
     $suite->addTest(Zend_Auth_AllTests::suite());
     $suite->addTestSuite('Zend_Console_GetoptTest');
     // Do not include Zend_Currency as empty testbeds can cause phpunit to crash
     //        $suite->addTest(Zend_Currency_AllTests::suite());
     $suite->addTestSuite('Zend_FilterTest');
     $suite->addTest(Zend_Filter_AllTests::suite());
     $suite->addTest(Zend_Mail_AllTests::suite());
     /*
      * To run the unit tests for Zend_Session*:
      * $ cd zftrunk/incubator/tests/Zend/Session
      * $ php AllTests.php
      */
     // $suite->addTest(Zend_Session_AllTests::suite());
     $suite->addTestSuite('Zend_TimeSyncTest');
     $suite->addTestSuite('Zend_ValidateTest');
     $suite->addTest(Zend_Validate_AllTests::suite());
     $suite->addTestSuite('Zend_TranslateTest');
     $suite->addTest(Zend_Translate_AllTests::suite());
     return $suite;
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:25,代码来源:AllTests.php

示例13: suite

   public static function suite() {
      $suite = new PHPUnit_Framework_TestSuite('GLPI');
      $suite->addTest(System_AllTests::suite());
      $suite->addTest(Install_AllTests::suite());
//      $suite->addTest(Framework_AllTests::suite());
      return $suite;
   }
开发者ID:KaneoGmbH,项目名称:glpi,代码行数:7,代码来源:AllTests.php

示例14: suite

 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_WindowsAzure');
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_CREDENTIALS_RUNTESTS) {
         $suite->addTest(Zend_Service_WindowsAzure_Credentials_AllTests::suite());
     }
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_DIAGNOSTICS_RUNTESTS) {
         $suite->addTest(Zend_Service_WindowsAzure_Diagnostics_AllTests::suite());
     }
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_MANAGEMENT_RUNTESTS) {
         $suite->addTest(Zend_Service_WindowsAzure_Management_AllTests::suite());
     }
     $suite->addTestSuite('Zend_Service_WindowsAzure_RetryPolicyTest');
     $suite->addTestSuite('Zend_Service_WindowsAzure_StorageTest');
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_BLOB_RUNTESTS) {
         $suite->addTestSuite('Zend_Service_WindowsAzure_BlobStorageTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_BlobStorageSharedAccessTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_BlobStreamTest');
     }
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_TABLE_RUNTESTS) {
         $suite->addTestSuite('Zend_Service_WindowsAzure_TableEntityTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_DynamicTableEntityTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_TableEntityQueryTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_TableStorageTest');
     }
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_QUEUE_RUNTESTS) {
         $suite->addTestSuite('Zend_Service_WindowsAzure_QueueStorageTest');
     }
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_SESSIONHANDLER_RUNTESTS) {
         $suite->addTestSuite('Zend_Service_WindowsAzure_TableSessionHandlerTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_BlobSessionHandlerTest');
     }
     return $suite;
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:34,代码来源:AllTests.php

示例15: suite

 /**
  * Test suite
  *
  * @return PHPUnit_Framework_TestSuite
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Firal CMS');
     $suite->addTest(Firal_AllTests::suite());
     $suite->addTest(Modules_AllTests::suite());
     return $suite;
 }
开发者ID:kokx,项目名称:Firal,代码行数:12,代码来源:AllTests.php


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