本文整理汇总了PHP中SugarTestUserUtilities::createAnonymousUser方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarTestUserUtilities::createAnonymousUser方法的具体用法?PHP SugarTestUserUtilities::createAnonymousUser怎么用?PHP SugarTestUserUtilities::createAnonymousUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarTestUserUtilities
的用法示例。
在下文中一共展示了SugarTestUserUtilities::createAnonymousUser方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* Create test account
*
*/
public function setUp()
{
$this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v3_1/soap.php';
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$this->acc = SugarTestAccountUtilities::createAccount();
parent::setUp();
}
示例2: setUp
public function setUp()
{
global $current_user;
$current_user = SugarTestUserUtilities::createAnonymousUser();
$this->email = new Email();
$this->email->email2init();
}
示例3: setUp
function setUp()
{
global $beanList, $beanFiles, $current_user;
require 'include/modules.php';
$current_user = SugarTestUserUtilities::createAnonymousUser();
SugarTestMergeUtilities::setupFiles(array('Meetings'), array('quickcreatedefs'), 'tests/modules/UpgradeWizard/SugarMerge/metadata_files');
}
示例4: setUp
public function setUp()
{
$user = SugarTestUserUtilities::createAnonymousUser();
$user->is_admin = true;
$user->save();
$GLOBALS['current_user'] = $user;
}
示例5: setup
public function setup()
{
global $current_user;
// Create Anon User setted on GMT+2 TimeZone
$current_user = SugarTestUserUtilities::createAnonymousUser();
$current_user->setPreference('datef', "d/m/Y");
$current_user->setPreference('timef', "H:i:s");
$current_user->setPreference('timezone', "Europe/Rome");
// new object to avoid TZ caching
$this->timedate = new TimeDate();
$this->meetingsArr = array();
// Create a Bunch of Meetings
$d = 12;
$cnt = 0;
while ($d < 15) {
$this->meetingsArr[$cnt] = new Meeting();
$this->meetingsArr[$cnt]->name = 'Bug45287 Meeting ' . ($cnt + 1);
$this->meetingsArr[$cnt]->date_start = $this->timedate->to_display_date_time(gmdate("Y-m-d H:i:s", mktime(10 + $cnt, 30, 00, 7, $d, 2011)));
$this->meetingsArr[$cnt]->save();
$d++;
$cnt++;
}
$this->searchDefs = array("Meetings" => array("layout" => array("basic_search" => array("name" => array("name" => "name", "default" => true, "width" => "10%"), "date_start" => array("name" => "date_start", "default" => true, "width" => "10%", "type" => "datetimecombo")))));
$this->searchFields = array("Meetings" => array("name" => array("query_type" => "default"), "date_start" => array("query_type" => "default"), "range_date_start" => array("query_type" => "default", "enable_range_search" => 1, "is_date_field" => 1), "range_date_start" => array("query_type" => "default", "enable_range_search" => 1, "is_date_field" => 1), "start_range_date_start" => array("query_type" => "default", "enable_range_search" => 1, "is_date_field" => 1), "end_range_date_start" => array("query_type" => "default", "enable_range_search" => 1, "is_date_field" => 1)));
}
示例6: setUpBeforeClass
public static function setUpBeforeClass()
{
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
// clean up queue
$GLOBALS['db']->query("DELETE FROM job_queue WHERE status='queued'");
$GLOBALS['sugar_config']['job_server'] = "http://test.job.server/";
}
示例7: setUp
public function setUp()
{
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$this->account = SugarTestAccountUtilities::createAccount();
$this->account->name = "SDizzle Inc";
$this->account->save();
}
示例8: setUp
public function setUp()
{
$beanList = array();
$beanFiles = array();
require 'include/modules.php';
$GLOBALS['beanList'] = $beanList;
$GLOBALS['beanFiles'] = $beanFiles;
//Reload langauge strings
$GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
$GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
//Create an anonymous user for login purposes/
$this->_user = SugarTestUserUtilities::createAnonymousUser();
$this->_admin_user = SugarTestUserUtilities::createAnonymousUser();
$this->_admin_user->status = 'Active';
$this->_admin_user->is_admin = 1;
$this->_admin_user->save();
$GLOBALS['db']->commit();
// Making sure we commit any changes before continuing
$GLOBALS['current_user'] = $this->_user;
self::$helperObject = new APIv3Helper();
//Disable access to the website field.
$this->aclRole = new ACLRole();
$this->aclRole->name = "Unit Test";
$this->aclRole->save();
$GLOBALS['db']->commit();
// Making sure we commit any changes before continuing
$this->aclRole->set_relationship('acl_roles_users', array('role_id' => $this->aclRole->id, 'user_id' => $this->_user->id), false);
$GLOBALS['db']->commit();
// Making sure we commit any changes before continuing
}
示例9: setUp
public function setUp()
{
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$this->user = $GLOBALS['current_user'];
$this->user->setPreference('default_decimal_seperator', '.');
$this->loc = new Localization();
}
示例10: setUp
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*
* @return void
*/
public function setUp()
{
$this->markTestIncomplete("Disabling broken test on CI. Working with Sergei to get it fixed");
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, true);
// add an extra relationship that will be used for search
self::registerExtension('Contacts', 'bug51596test.php', array('Contact' => array('fields' => array($this->field_name => array('name' => $this->field_name, 'rname' => 'name', 'id_name' => 'account_id', 'join_name' => 'accounts', 'type' => 'relate', 'link' => 'accounts', 'table' => 'accounts', 'module' => 'Accounts', 'source' => 'non-db')))));
// this is needed for newly created extension to be loaded for new beans
$_SESSION['developerMode'] = true;
// create a set of contacts and related accounts
$this->contact1 = new Contact();
$this->contact1->do_not_call = 0;
$this->contact1->save();
$this->contact2 = new Contact();
$this->contact2->do_not_call = 0;
$this->contact2->save();
$this->account1 = new Account();
$this->account1->name = 'Bug51596Test_Account1';
$this->account1->save();
$this->account2 = new Account();
$this->account2->name = 'Bug51596Test_Account2';
$this->account2->save();
$this->contact1->load_relationship('accounts');
$this->contact2->load_relationship('accounts');
/** @var Link2 $accounts1 */
$accounts1 = $this->contact1->accounts;
$accounts1->add(array($this->account1->id));
/** @var Link2 $accounts2 */
$accounts2 = $this->contact2->accounts;
$accounts2->add(array($this->account2->id));
// will update "do_not_call" attribute of found contacts
$_REQUEST['massupdate'] = 'true';
$_REQUEST['entire'] = true;
$_REQUEST['module'] = 'Contacts';
$_POST['do_not_call'] = 1;
}
示例11: setUp
public function setUp()
{
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$this->_goodFile = SugarTestImportUtilities::createFile(2000, 3);
$this->_badFile = ImportCacheFiles::getImportDir() . '/thisfileisntthere' . date("YmdHis");
$this->_whiteSpaceFile = SugarTestImportUtilities::createFileWithWhiteSpace();
}
示例12: setUp
public function setUp()
{
global $mod_strings;
$mod_strings = return_module_language($GLOBALS['current_language'], 'Leads');
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, 1);
$GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
}
示例13: setUp
public function setUp()
{
SugarTestHelper::setUp('mod_strings', array('ModuleBuilder'));
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$_SESSION['authenticated_user_language'] = 'en_us';
$_REQUEST['dropdown_name'] = 'testDD';
}
示例14: setUp
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*
* Creates a temporary opportunity
*/
public function setUp()
{
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$this->opportunity = new Opportunity();
$this->opportunity->currency_id = -99;
$this->opportunity->save();
}
示例15: setUp
public function setUp()
{
$this->markTestIncomplete('SugarTestCampaignUtilities does not exist');
$GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
$campaign = SugarTestCampaignUtilities::createCampaign();
$this->campaign_id = $campaign->id;
}