• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ImportBaseTest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了ImportBaseTest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
     $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


示例3: 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


示例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: setUp

 public function setUp()
 {
     parent::setUp();
     if (!EmailMessageTestHelper::isSetEmailAccountsTestConfiguration()) {
         $this->markTestSkipped('Please fix the test email settings');
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:TestOutboundEmailJobTest.php


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


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


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


示例16: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
 }
开发者ID:RamaKavanan,项目名称:BaseVersion,代码行数:5,代码来源:OpportunityMappingRuleFormAndElementTypeUtilTest.php


示例17: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = $super;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:6,代码来源:MappingFormLayoutUtilTest.php


示例18: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     UserTestHelper::createBasicUser('billy');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:6,代码来源:TestOutboundEmailJobTest.php


示例19: setUp

 public function setUp()
 {
     parent::setUp();
     static::generateCsvAndReturnFileName(static::$csvFileSizesToTest[static::$testCounter]);
     static::$testCounter++;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:6,代码来源:ImportDatabasePerformanceTest.php


示例20: setUp

 public function setUp()
 {
     parent::setUp();
     Yii::app()->user->userModel = User::getByUsername('super');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:5,代码来源:MappingRuleFormAndElementTypeUtilTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ImportExportPlugin类代码示例发布时间:2022-05-23
下一篇:
PHP Import类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap