本文整理汇总了PHP中BaseTest::setUpBeforeClass方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseTest::setUpBeforeClass方法的具体用法?PHP BaseTest::setUpBeforeClass怎么用?PHP BaseTest::setUpBeforeClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseTest
的用法示例。
在下文中一共展示了BaseTest::setUpBeforeClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$server_api = new Swagger\Client\Api\ServerApi(self::$api_client);
self::$lan_api = new Swagger\Client\Api\LanApi(self::$api_client);
}
示例2: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$volume_api = new Swagger\Client\Api\VolumeApi(self::$api_client);
self::$snapshot_api = new Swagger\Client\Api\SnapshotApi(self::$api_client);
}
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
}
示例4: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$server_api = new Swagger\Client\Api\ServerApi(self::$api_client);
self::$nic_api = new Swagger\Client\Api\NetworkInterfacesApi(self::$api_client);
}
示例5: setUpBeforeClass
/**
* {@inheritdoc}
*/
public static function setUpBeforeClass()
{
// Set up parent
parent::setUpBeforeClass();
// Require dependencies
require_once __DIR__ . '/../services/AuditLogService.php';
require_once __DIR__ . '/../models/AuditLogModel.php';
}
示例6: setupBeforeClass
public static function setupBeforeClass()
{
parent::setUpBeforeClass();
foreach (self::$testMessages as $source => $translation) {
$sourceModel = MessageSource::addNewSource(self::$testCategory, $source);
MessageTranslation::addNewTranslation(self::$testLanguageCode, $sourceModel, $translation);
}
}
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
ModulesSearchWithDataProviderTestHelper::createCustomAttributesForModel(new TestOperatorTypeModel());
}
示例8: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
ProductTestHelper::createProductByNameForOwner('First Product', User::getByUsername('super'));
sleep(3);
ProductTestHelper::createProductByNameForOwner('Second Product', User::getByUsername('super'));
}
示例9: setUpBeforeClass
/**
* {@inheritdoc}
*/
public static function setUpBeforeClass()
{
// Set up parent
parent::setUpBeforeClass();
// Require dependencies
require_once __DIR__ . '/../services/AuditLogService.php';
require_once __DIR__ . '/../services/AuditLog_CategoryService.php';
require_once __DIR__ . '/../records/AuditLogRecord.php';
}
示例10: setUpBeforeClass
/**
* {@inheritdoc}
*/
public static function setUpBeforeClass()
{
// Set up parent
parent::setUpBeforeClass();
// Require dependencies
require_once __DIR__ . '/../services/ZipAssetsService.php';
// Create test file
@touch(__DIR__ . '/test.jpg');
}
示例11: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$server_api = new Swagger\Client\Api\ServerApi(self::$api_client);
self::$volume_api = new Swagger\Client\Api\VolumeApi(self::$api_client);
self::$attached_volume_api = new Swagger\Client\Api\AttachedVolumesApi(self::$api_client);
self::$cdrom_api = new Swagger\Client\Api\AttachedCDROMsApi(self::$api_client);
}
示例12: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
// Removes cached authentication data if any
self::$objectStorage->reloadAuthenticationData();
// This container will be used to test creation/update and delete
self::$newContainerName = 'phpUnit_' . substr(md5(time()), 0, 7) . time();
self::$newContainerMeta = 'META DATA TO TEST';
}
示例13: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$values = array('Automotive', 'Adult Entertainment', 'Financial Services', 'Mercenaries & Armaments');
$industryFieldData = CustomFieldData::getByName('Industries');
$industryFieldData->defaultValue = $values[1];
$industryFieldData->serializedData = serialize($values);
if (!$industryFieldData->save()) {
throw new FailedToSaveRedBeanModelException();
}
}
示例14: setUpBeforeClass
/**
* {@inheritdoc}
*/
public static function setUpBeforeClass()
{
// Set up parent
parent::setUpBeforeClass();
// Require dependencies
require_once __DIR__ . '/../services/TranslateService.php';
require_once __DIR__ . '/../elementtypes/TranslateElementType.php';
require_once __DIR__ . '/../models/TranslateModel.php';
// Create test translation file
$file = __DIR__ . '/../translations/test.php';
IOHelper::writeToFile($file, '<?php return array (\'test\' => \'test\');');
}
示例15: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
Yii::app()->emailHelper->outboundType = 'smtp';
Yii::app()->emailHelper->outboundHost = Yii::app()->params['emailTestAccounts']['userSmtpSettings']['outboundHost'];
Yii::app()->emailHelper->outboundPort = Yii::app()->params['emailTestAccounts']['userSmtpSettings']['outboundPort'];
Yii::app()->emailHelper->outboundUsername = Yii::app()->params['emailTestAccounts']['userSmtpSettings']['outboundUsername'];
Yii::app()->emailHelper->outboundPassword = Yii::app()->params['emailTestAccounts']['userSmtpSettings']['outboundPassword'];
Yii::app()->emailHelper->outboundSecurity = Yii::app()->params['emailTestAccounts']['userSmtpSettings']['outboundSecurity'];
Yii::app()->emailHelper->setOutboundSettings();
}