當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。