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


PHP SugarTestHelper類代碼示例

本文整理匯總了PHP中SugarTestHelper的典型用法代碼示例。如果您正苦於以下問題:PHP SugarTestHelper類的具體用法?PHP SugarTestHelper怎麽用?PHP SugarTestHelper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: tearDown

 public function tearDown()
 {
     $GLOBALS['db']->query("DELETE FROM email_addr_bean_rel WHERE bean_id = '{$this->_cleanId}' AND bean_module = '{$this->_importObject->module_dir}'");
     $GLOBALS['db']->query("DELETE FROM email_addresses WHERE email_address IN ('testmail1@test.com', 'testmail2@test.com', 'testmail3@test.com')");
     $GLOBALS['db']->query("DELETE FROM {$this->_importObject->table_name} WHERE created_by = '{$GLOBALS['current_user']->id}'");
     SugarTestHelper::tearDown();
 }
開發者ID:thsonvt,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug25736ImportTest.php

示例2: tearDown

 public function tearDown()
 {
     SugarTestCallUtilities::removeAllCreatedCalls();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestTaskUtilities::removeAllCreatedTasks();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug58702Test.php

示例3: tearDown

 public function tearDown()
 {
     unset($_REQUEST['dropdown_name']);
     unset($_SESSION['authenticated_user_language']);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug47010Test.php

示例4: tearDown

 public function tearDown()
 {
     $GLOBALS['db']->query("DELETE FROM folders_subscriptions WHERE assigned_user_id='{$GLOBALS['current_user']->id}'");
     $GLOBALS['db']->query("DELETE FROM folders WHERE created_by='{$GLOBALS['current_user']->id}' OR name='Bug62883Test'");
     $GLOBALS['db']->query("DELETE FROM folders_subscriptions WHERE assigned_user_id='{$GLOBALS['current_user']->id}'");
     SugarTestHelper::tearDown();
 }
開發者ID:thsonvt,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug62883Test.php

示例5: tearDown

 public function tearDown()
 {
     SugarTestHelper::tearDown();
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestLeadUtilities::removeAllCreatedLeads();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug25736ExportTest.php

示例6: tearDown

 public function tearDown()
 {
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug51679Test.php

示例7: tearDown

 public function tearDown()
 {
     $GLOBALS['db']->query('DELETE FROM opportunities WHERE id = \'' . $this->opportunities->id . '\' ');
     unset($this->opportunities);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestHelper::tearDown();
 }
開發者ID:thsonvt,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug46276Test.php

示例8: createRelationship

 /**
  * Create a relationship
  *
  * Params should be passed in as this:
  *
  * array(
  *       'relationship_type' => 'one-to-many',
  *       'lhs_module' => 'Accounts',
  *       'rhs_module' => 'Accounts',
  *   )
  *
  * @static
  * @param array $relationship_def
  * @return ActivitiesRelationship|bool|ManyToManyRelationship|ManyToOneRelationship|OneToManyRelationship|OneToOneRelationship
  */
 public static function createRelationship(array $relationship_def)
 {
     if (!self::checkRequiredFields($relationship_def)) {
         return false;
     }
     $relationships = new DeployedRelationships($relationship_def['lhs_module']);
     if (!isset($relationship_def['view_module'])) {
         $relationship_def['view_module'] = $relationship_def['lhs_module'];
     }
     $REQUEST_Backup = $_REQUEST;
     $_REQUEST = $relationship_def;
     $relationship = $relationships->addFromPost();
     $relationships->save();
     $relationships->build();
     LanguageManager::clearLanguageCache($relationship_def['lhs_module']);
     SugarRelationshipFactory::rebuildCache();
     // rebuild the dictionary to make sure that it has the new relationship in it
     SugarTestHelper::setUp('dictionary');
     // reset the link fields since we added one
     VardefManager::$linkFields = array();
     $_REQUEST = $REQUEST_Backup;
     unset($REQUEST_Backup);
     self::$_relsAdded[] = $relationship->getDefinition();
     return $relationship;
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:40,代碼來源:SugarTestRelationshipUtilities.php

示例9: tearDown

 public function tearDown()
 {
     SugarTestHelper::tearDown();
     $GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->_contact->id}'");
     unset($this->_contact);
     if ($this->_hasUnifiedSearchModulesConfig) {
         copy(sugar_cached('modules/unified_search_modules.php.bak'), sugar_cached('modules/unified_search_modules.php'));
         unlink(sugar_cached('modules/unified_search_modules.php.bak'));
     } else {
         unlink(sugar_cached('modules/unified_search_modules.php'));
     }
     if ($this->_hasUnifiedSearchModulesDisplay) {
         copy('custom/modules/unified_search_modules_display.php.bak', 'custom/modules/unified_search_modules_display.php');
         unlink('custom/modules/unified_search_modules_display.php.bak');
     } else {
         unlink('custom/modules/unified_search_modules_display.php');
     }
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     if (isset($_REQUEST['module'])) {
         unset($_REQUEST['module']);
     }
     if (isset($_REQUEST['query_string'])) {
         unset($_REQUEST['query_string']);
     }
     if (isset($_REQUEST['enabled_modules'])) {
         unset($_REQUEST['enabled_modules']);
     }
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:28,代碼來源:UnifiedSearchAdvancedTest.php

示例10: tearDown

 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:7,代碼來源:Bug49281Test.php

示例11: tearDown

 public function tearDown()
 {
     $this->relateField->delete($this->df);
     $this->rc->repairAndClearAll(array("rebuildExtensions", "clearVardefs"), array("Contact"), false, false);
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestHelper::tearDown();
 }
開發者ID:thsonvt,項目名稱:sugarcrm_dev,代碼行數:8,代碼來源:Bug52173Test.php

示例12: tearDown

 /**
  * Tears down the fixture, for example, close a network connection.
  * This method is called after a test is executed.
  */
 public function tearDown()
 {
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestOpportunityUtilities::removeAllCreatedOpportunities();
     SugarTestContactUtilities::removeAllCreatedContacts();
     parent::tearDown();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:12,代碼來源:Bug56652Test.php

示例13: tearDown

 public function tearDown()
 {
     $_POST = array();
     $this->bean->db->query("DELETE FROM meetings WHERE id = '" . $this->bean->id . "'");
     $this->bean->db->query("DELETE FROM {$this->bean->rel_users_table} WHERE meeting_id = '" . $this->bean->id . "'");
     parent::tearDown();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:8,代碼來源:Bug57299Test.php

示例14: tearDown

 public function tearDown()
 {
     foreach ($this->_createdBeans as $bean) {
         $bean->retrieve($bean->id);
         $bean->mark_deleted($bean->id);
     }
     SugarTestHelper::tearDown();
 }
開發者ID:newLoki,項目名稱:sugarcrm_dev,代碼行數:8,代碼來源:Bug49505Test.php

示例15: tearDown

 public function tearDown()
 {
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestContactUtilities::removeAllCreatedContacts();
     parent::tearDown();
     parent::_tearDownTestUser();
     SugarTestHelper::tearDown();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:8,代碼來源:Bug38858Test.php


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