本文整理汇总了PHP中ImportBaseTest类的典型用法代码示例。如果您正苦于以下问题:PHP ImportBaseTest类的具体用法?PHP ImportBaseTest怎么用?PHP ImportBaseTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ImportBaseTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
$jim = UserTestHelper::createBasicUser('jim');
$values = array('Test1', 'Test2', 'Test3', 'Sample', 'Demo');
$customFieldData = CustomFieldData::getByName('ImportTestDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
$values = array('Multi 1', 'Multi 2', 'Multi 3');
$customFieldData = CustomFieldData::getByName('ImportTestMultiDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
$values = array('Cloud 1', 'Cloud 2', 'Cloud 3');
$customFieldData = CustomFieldData::getByName('ImportTestTagCloud');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
//Ensure the external system id column is present.
$columnName = ExternalSystemIdUtil::EXTERNAL_SYSTEM_ID_COLUMN_NAME;
RedBeanColumnTypeOptimizer::externalIdColumn(User::getTableName('User'), $columnName);
$userTableName = User::getTableName('User');
R::exec("update " . $userTableName . " set {$columnName} = 'A' where id = {$super->id}");
R::exec("update " . $userTableName . " set {$columnName} = 'B' where id = {$jim->id}");
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem::getTableName('ImportModelTestItem'), $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem2::getTableName('ImportModelTestItem2'), $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem3::getTableName('ImportModelTestItem3'), $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem4::getTableName('ImportModelTestItem4'), $columnName);
}
示例2: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
$jim = UserTestHelper::createBasicUser('jim');
$values = array('Test1', 'Test2', 'Test3', 'Sample', 'Demo');
$customFieldData = CustomFieldData::getByName('ImportTestDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
$values = array('Multi 1', 'Multi 2', 'Multi 3');
$customFieldData = CustomFieldData::getByName('ImportTestMultiDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
$values = array('Cloud 1', 'Cloud 2', 'Cloud 3');
$customFieldData = CustomFieldData::getByName('ImportTestTagCloud');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
//Ensure the external system id column is present.
$userTableName = User::getTableName();
ExternalSystemIdUtil::addExternalIdColumnIfMissing($userTableName);
ExternalSystemIdUtil::updateByModel($super, 'A');
ExternalSystemIdUtil::updateByModel($jim, 'B');
ExternalSystemIdUtil::addExternalIdColumnIfMissing(ImportModelTestItem::getTableName());
ExternalSystemIdUtil::addExternalIdColumnIfMissing(ImportModelTestItem2::getTableName());
ExternalSystemIdUtil::addExternalIdColumnIfMissing(ImportModelTestItem3::getTableName());
ExternalSystemIdUtil::addExternalIdColumnIfMissing(ImportModelTestItem4::getTableName());
}
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
Yii::import('application.core.data.*');
Yii::import('application.modules.projects.data.*');
}
示例4: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
ContactsModule::loadStartingData();
}
示例5: setUp
public function setUp()
{
parent::setUp();
if (!EmailMessageTestHelper::isSetEmailAccountsTestConfiguration()) {
$this->markTestSkipped('Please fix the test email settings');
}
}
示例6: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
Yii::import('application.core.data.*');
Yii::import('application.modules.products.data.*');
$defaultDataMaker = new ProductsDefaultDataMaker();
$defaultDataMaker->make();
}
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
$accountTableName = Account::getTableName();
$contactTableName = Contact::getTableName();
$opportunityTableName = Opportunity::getTableName();
ExternalSystemIdUtil::addExternalIdColumnIfMissing($accountTableName);
ExternalSystemIdUtil::addExternalIdColumnIfMissing($contactTableName);
ExternalSystemIdUtil::addExternalIdColumnIfMissing($opportunityTableName);
}
示例8: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
$accountTableName = Account::getTableName('Account');
$contactTableName = Contact::getTableName('Contact');
$opportunityTableName = Opportunity::getTableName('Opportunity');
$columnName = ExternalSystemIdUtil::EXTERNAL_SYSTEM_ID_COLUMN_NAME;
RedBeanColumnTypeOptimizer::externalIdColumn($accountTableName, $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn($contactTableName, $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn($opportunityTableName, $columnName);
}
示例9: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
Yii::app()->timeZoneHelper->load();
$values = array('Test1', 'Test2', 'Test3', 'Sample', 'Demo');
$customFieldData = CustomFieldData::getByName('ImportTestDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
Currency::getAll();
//forces base currency to be created.
}
示例10: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
Yii::import('application.core.data.*');
Yii::import('application.modules.accounts.data.*');
$defaultDataMaker = new AccountsDefaultDataMaker();
$defaultDataMaker->make();
Yii::import('application.modules.contacts.data.*');
$defaultDataMaker = new ContactsDefaultDataMaker();
$defaultDataMaker->make();
Currency::getAll();
//forces base currency to be created.
ContactsModule::loadStartingData();
}
示例11: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
ExternalSystemIdUtil::addExternalIdColumnIfMissing(Account::getTableName());
ExternalSystemIdUtil::addExternalIdColumnIfMissing(Contact::getTableName());
ExternalSystemIdUtil::addExternalIdColumnIfMissing(Opportunity::getTableName());
$account = AccountTestHelper::createAccountByNameForOwner('testAccount', $super);
ImportTestHelper::updateModelsExternalId($account, 'ACC');
$contact = ContactTestHelper::createContactByNameForOwner('testContact', $super);
ImportTestHelper::updateModelsExternalId($contact, 'CON');
$opportunity = OpportunityTestHelper::createOpportunityByNameForOwner('testOpportunity', $super);
ImportTestHelper::updateModelsExternalId($opportunity, 'OPP');
}
示例12: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$super = SecurityTestHelper::createSuperAdmin();
Yii::app()->user->userModel = $super;
$columnName = ExternalSystemIdUtil::EXTERNAL_SYSTEM_ID_COLUMN_NAME;
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem::getTableName('Account'), $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem2::getTableName('Contact'), $columnName);
RedBeanColumnTypeOptimizer::externalIdColumn(ImportModelTestItem3::getTableName('Opportunity'), $columnName);
$account = AccountTestHelper::createAccountByNameForOwner('testAccount', $super);
ImportTestHelper::updateModelsExternalId($account, 'ACC');
$contact = ContactTestHelper::createContactByNameForOwner('testContact', $super);
ImportTestHelper::updateModelsExternalId($contact, 'CON');
$opportunity = OpportunityTestHelper::createOpportunityByNameForOwner('testOpportunity', $super);
ImportTestHelper::updateModelsExternalId($opportunity, 'OPP');
}
示例13: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$jim = UserTestHelper::createBasicUser('jim');
$values = array('Multi 1', 'Multi 2', 'Multi 3');
$customFieldData = CustomFieldData::getByName('ImportTestMultiDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
$values = array('Cloud 1', 'Cloud 2', 'Cloud 3');
$customFieldData = CustomFieldData::getByName('ImportTestTagCloud');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
}
示例14: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
Yii::import('application.core.data.*');
Yii::import('application.modules.contracts.data.*');
$defaultDataMaker = new ContractsDefaultDataMaker();
$defaultDataMaker->make();
Yii::import('application.modules.contacts.data.*');
$defaultDataMaker = new ContactsDefaultDataMaker();
$defaultDataMaker->make();
Currency::getAll();
//forces base currency to be created.
$currency = new Currency();
$currency->code = 'EUR';
$currency->rateToBase = 2;
assert($currency->save());
// Not Coding Standard
$currency = new Currency();
$currency->code = 'GBP';
$currency->rateToBase = 2;
assert($currency->save());
// Not Coding Standard
}
示例15: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
ContactsModule::loadStartingData();
}