當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Common_TestCase::setUp方法代碼示例

本文整理匯總了PHP中Common_TestCase::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP Common_TestCase::setUp方法的具體用法?PHP Common_TestCase::setUp怎麽用?PHP Common_TestCase::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Common_TestCase的用法示例。


在下文中一共展示了Common_TestCase::setUp方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag');
     $this->target_func = 'HTML_TAG_CHECK';
 }
開發者ID:casan,項目名稱:eccube-2_13,代碼行數:7,代碼來源:SC_CheckError_HTML_TAG_CHECKTest.php

示例2: setUp

 protected function setUp()
 {
     global $DB;
     parent::setUp();
     $DB->connect();
     self::restore_database();
     $DB->query("UPDATE `glpi_rules`\n         SET `is_active`='0'\n         WHERE `sub_type`='PluginFusioninventoryInventoryRuleImport'");
     // Add a rule to ignore import
     // Create rule for import into unknown devices
     $rulecollection = new PluginFusioninventoryInventoryRuleImportCollection();
     $input = array();
     $input['is_active'] = 1;
     $input['name'] = 'Ignore import';
     $input['match'] = 'AND';
     $input['sub_type'] = 'PluginFusioninventoryInventoryRuleImport';
     $input['ranking'] = 200;
     $rule_id = $rulecollection->add($input);
     // Add criteria
     $rule = $rulecollection->getRuleClass();
     $rulecriteria = new RuleCriteria(get_class($rule));
     $input = array();
     $input['rules_id'] = $rule_id;
     $input['criteria'] = "name";
     $input['pattern'] = '*';
     $input['condition'] = 0;
     $rulecriteria->add($input);
     // Add action
     $ruleaction = new RuleAction(get_class($rule));
     $input = array();
     $input['rules_id'] = $rule_id;
     $input['action_type'] = 'assign';
     $input['field'] = '_ignore_import';
     $input['value'] = '1';
     $ruleaction->add($input);
 }
開發者ID:C-Duv,項目名稱:fusioninventory-for-glpi,代碼行數:35,代碼來源:RuleIgnoredImportTest.php

示例3: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->old_reporting_level = error_reporting();
     error_reporting($this->old_reporting_level ^ (E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE));
     $this->arrForm = array('form' => array(0 => 'A', 1 => "B", 2 => 'C'));
     $this->objErr = new SC_CheckError_Ex($this->arrForm);
 }
開發者ID:casan,項目名稱:eccube-2_13,代碼行數:8,代碼來源:SC_CheckError_createParamTest.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->objDate = new SC_Date_Ex();
     $objQuery = SC_Query_Ex::getSingletonInstance();
     //休日を登録
     $holiday = array(array('holiday_id' => '1', 'title' => 'TEST HOLIDAY1', 'month' => '2', 'day' => '14', 'rank' => '1', 'creator_id' => '1', 'create_date' => '2013-02-14 11:22:33', 'update_date' => '2013-02-14 22:11:33', 'del_flg' => '0'), array('holiday_id' => '2', 'title' => 'TEST HOLIDAY2', 'month' => '3', 'day' => '26', 'rank' => '2', 'creator_id' => '1', 'create_date' => '2013-02-15 11:22:33', 'update_date' => '2013-02-16 22:11:33', 'del_flg' => '0'));
     //休みの曜日を登録
     $baseInfo = array('id' => '1', 'regular_holiday_ids' => '0|6', 'update_date' => '2013-02-14 22:11:33');
     $objQuery->delete('dtb_holiday');
     $objQuery->delete('dtb_baseinfo');
     foreach ($holiday as $key => $item) {
         $objQuery->insert('dtb_holiday', $item);
     }
     $objQuery->insert('dtb_baseinfo', $baseInfo);
 }
開發者ID:casan,項目名稱:eccube-2_13,代碼行數:16,代碼來源:SC_Date_isHolidayTest.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     self::restore_database();
     // Add some computers
     $computer = new Computer();
     $pfAgent = new PluginFusioninventoryAgent();
     $computer->add(array('name' => 'pc01', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 1, 'entities_id' => 0));
     $computer->add(array('name' => 'pc02', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 2, 'entities_id' => 0));
     $computer->add(array('name' => 'pc03', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 3, 'entities_id' => 0));
     $computer->add(array('name' => 'pc04', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 4, 'entities_id' => 0));
     $computer->add(array('name' => 'pc05', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 5, 'entities_id' => 0));
     $computer->add(array('name' => 'pc06', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 6, 'entities_id' => 0));
     $computer->add(array('name' => 'pc07', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 7, 'entities_id' => 0));
     $computer->add(array('name' => 'pc08', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 8, 'entities_id' => 0));
     $computer->add(array('name' => 'pc09', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 9, 'entities_id' => 0));
     $computer->add(array('name' => 'pc10', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 10, 'entities_id' => 0));
     $computer->add(array('name' => 'pc11', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 11, 'entities_id' => 0));
     $computer->add(array('name' => 'pc12', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 12, 'entities_id' => 0));
     $computer->add(array('name' => 'pc13', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 13, 'entities_id' => 0));
     $computer->add(array('name' => 'srv01', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 14, 'entities_id' => 0));
     $computer->add(array('name' => 'srv02', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 15, 'entities_id' => 0));
     $computer->add(array('name' => 'srv03', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 16, 'entities_id' => 0));
     $computer->add(array('name' => 'srv04', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 17, 'entities_id' => 0));
     $computer->add(array('name' => 'srv05', 'entities_id' => 0));
     $pfAgent->add(array('computers_id' => 18, 'entities_id' => 0));
 }
開發者ID:C-Duv,項目名稱:fusioninventory-for-glpi,代碼行數:44,代碼來源:TaskDeployDynamicGroupTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
 }
開發者ID:ryoogata,項目名稱:eccube-SQLAzureSupport-plugin,代碼行數:4,代碼來源:SC_Utils_sfGetCommaListTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->objDate = new SC_Date_Ex();
 }
開發者ID:ryoogata,項目名稱:eccube-SQLAzureSupport-plugin,代碼行數:5,代碼來源:SC_Date_getMonthTest.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->setUpProductsClass();
 }
開發者ID:sai-ken-tanaka,項目名稱:eccube-2_13,代碼行數:5,代碼來源:SC_Utils_sfGetProductClassIdTest.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->objSiteSession = new SC_SiteSession_Ex();
 }
開發者ID:Rise-Up-Cambodia,項目名稱:Rise-Up,代碼行數:5,代碼來源:SC_SiteSession_setRegistFlagTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag');
 }
開發者ID:ryoogata,項目名稱:eccube-SQLAzureSupport-plugin,代碼行數:6,代碼來源:SC_CheckError_HTML_TAG_CHECKTest.php

示例11: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->setUpClassCat();
 }
開發者ID:rocky-ice-cream,項目名稱:003_eccube_test,代碼行數:5,代碼來源:SC_Utils_sfGetClassCatCountTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->setUpAddress();
 }
開發者ID:ryoogata,項目名稱:eccube-SQLAzureSupport-plugin,代碼行數:5,代碼來源:SC_Utils_sfGetAddressTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->target_func = 'EXIST_CHECK';
 }
開發者ID:casan,項目名稱:eccube-2_13,代碼行數:5,代碼來源:SC_CheckError_EXIST_CHECKTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->su = new SC_SmartphoneUserAgent_Ex();
 }
開發者ID:casan,項目名稱:eccube-2_13,代碼行數:5,代碼來源:SC_SmartphoneUserAgent_isSmartphoneTest.php


注:本文中的Common_TestCase::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。