本文整理汇总了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'])));
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例8: suite
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('xPDOSuite');
$suite->addTest(MODx_AllTests::suite());
$suite->addTest(Processors_AllTests::suite());
return $suite;
}
示例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;
}
示例10: suite
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('Project');
$suite->addTest(FourStore_TestsOffLine::suite());
$suite->addTest(FourStore_TestsOnLine::suite());
return $suite;
}
示例11: suite
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('WindFramework AllTest');
$suite->addTest(AllBaseTest::suite());
$suite->addTest(AllWebTest::suite());
return $suite;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}