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


PHP ImportBaseTest::setUpBeforeClass方法代码示例

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


在下文中一共展示了ImportBaseTest::setUpBeforeClass方法的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);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:35,代码来源:ImportDataAnalyzerTest.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::import('application.core.data.*');
     Yii::import('application.modules.projects.data.*');
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:ProjectImportTest.php

示例3: 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());
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:34,代码来源:ImportDataAnalyzerTest.php

示例4: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = $super;
     ContactsModule::loadStartingData();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:ContactsImportDataAnalyzerTest.php

示例5: 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();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:9,代码来源:ProductImportTest.php

示例6: 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);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:TasksImportDataAnalyzerTest.php

示例7: 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);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:13,代码来源:TasksImportDataAnalyzerTest.php

示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     UserTestHelper::createBasicUser('billy');
     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();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:TestOutboundEmailJobTest.php

示例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.
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:15,代码来源:ImportSanitizerUtilTest.php

示例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();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:LeadImportTest.php

示例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');
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:ActivityImportBaseTest.php

示例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');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:16,代码来源:ActivityImportBaseTest.php

示例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
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:18,代码来源:ImportUtilTest.php

示例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
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:24,代码来源:ContractImportTest.php

示例15: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     ContactsModule::loadStartingData();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:6,代码来源:ContactImportSanitizerUtilTest.php


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