public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super); AccountTestHelper::createAccountByNameForOwner('superAccount2', $super); ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account); ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account); OpportunityTestHelper::createOpportunityStagesIfDoesNotExist(); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp2', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp3', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp4', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp5', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp6', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp7', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp8', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp9', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp10', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp11', $super, $account); OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp12', $super, $account); //Setup default dashboard. Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. AccountTestHelper::createAccountByNameForOwner('superAccount', $super); AccountTestHelper::createAccountByNameForOwner('superAccount2', $super); AccountTestHelper::createAccountByNameForOwner('superAccount3', $super); AccountTestHelper::createAccountByNameForOwner('superAccount4', $super); AccountTestHelper::createAccountByNameForOwner('superAccount5', $super); AccountTestHelper::createAccountByNameForOwner('superAccount6', $super); AccountTestHelper::createAccountByNameForOwner('superAccount7', $super); AccountTestHelper::createAccountByNameForOwner('superAccount8', $super); AccountTestHelper::createAccountByNameForOwner('superAccount9', $super); AccountTestHelper::createAccountByNameForOwner('superAccount10', $super); AccountTestHelper::createAccountByNameForOwner('superAccount11', $super); AccountTestHelper::createAccountByNameForOwner('superAccount12', $super); AccountTestHelper::createAccountByNameForOwner('superAccount13', $super); AccountTestHelper::createAccountByNameForOwner('superAccount14', $super); AccountTestHelper::createAccountByNameForOwner('superAccount15', $super); AccountTestHelper::createAccountByNameForOwner('superAccount16', $super); AccountTestHelper::createAccountByNameForOwner('superAccount17', $super); AccountTestHelper::createAccountByNameForOwner('superAccount18', $super); AccountTestHelper::createAccountByNameForOwner('superAccount19', $super); AccountTestHelper::createAccountByNameForOwner('superAccount20', $super); //Setup default dashboard. Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; }
public function setUp() { parent::setUp(); Yii::app()->user->userModel = User::getByUsername('super'); $file = ZurmoTestHelper::createImageFileModel(); $this->imageFile1Id = $file->id; $file->forget(); }
public function setUp() { parent::setUp(); $this->user = User::getByUsername('super'); Yii::app()->user->userModel = $this->user; $campaigns = Campaign::getAll(); $this->campaign = $campaigns[0]; }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; NotificationTestHelper::createNotificationByContentAndTypeForOwner('message1', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; ContactsModule::loadStartingData(); }
public function setup() { parent::setUp(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; $this->modelsWithMashableInboxInterface = array_keys(MashableUtil::getModelDataForCurrentUserByInterfaceName('MashableInboxInterface')); }
public function setUp() { parent::setUp(); $this->user = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); Yii::app()->user->userModel = $this->user; $marketingListId = static::$marketingList->id; static::$marketingList->forget(); static::$marketingList = MarketingList::getById($marketingListId); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. ProductTemplateTestHelper::createProductTemplateByName('My Product Template'); }
public function setUp() { parent::setUp(); $this->super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); $savedWorkflows = SavedWorkflow::getAll(); $this->savedWorkflow = $savedWorkflows[0]; $models = WorkflowModelTestItem::getAll(); $this->model = $models[0]; }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. LeadTestHelper::createLeadbyNameForOwner('superLead', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. AccountTestHelper::createAccountByNameForOwner('superAccount', $super); AddressGeoCodeTestHelper::createAndRemoveAccountWithAddress($super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; Currency::makeBaseCurrency(); //Create a Product Template for testing. ProductTemplateTestHelper::createProductTemplateByName('superProductTemplate', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; // create ContactStates ContactsModule::loadStartingData(); static::$baseUsername = StringUtil::generateRandomString(6, implode(range('a', 'z'))); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. self::$account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super); self::$account2 = AccountTestHelper::createAccountByNameForOwner('superAccount2', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. ReadPermissionsOptimizationUtil::rebuild(); $simpleUser = UserTestHelper::createBasicUser('simpleUser'); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; Currency::makeBaseCurrency(); //create a lead here LeadTestHelper::createLeadbyNameForOwner('superLead', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; Currency::makeBaseCurrency(); //Create a account for testing $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. //Setup default dashboard. Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super); ContactsModule::loadStartingData(); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; ProductTestHelper::createProductByNameForOwner('My First Prod', Yii::app()->user->userModel); ProductTestHelper::createProductByNameForOwner('My Second Prod', Yii::app()->user->userModel); CalendarTestHelper::createSavedCalendarByName("My Cal 1", '#315AB0'); CalendarTestHelper::createSavedCalendarByName("My Cal 2", '#66367b'); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super); $contact = ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account); $contactWithNoAccount = ContactTestHelper::createContactByNameForOwner('noAccountContact', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Create some extra users SecurityTestHelper::createUsers(); $confused = UserTestHelper::createBasicUser('confused'); $nobody = UserTestHelper::createBasicUser('nobody'); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); $super = SecurityTestHelper::createSuperAdmin(); Yii::app()->user->userModel = $super; ReadPermissionsOptimizationUtil::rebuild(); ContactsModule::loadStartingData(); //Setup test data owned by the super user. AccountTestHelper::createAccountByNameForOwner('Dinamite', $super); AccountTestHelper::createAccountByNameForOwner('dino', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. AccountTestHelper::createAccountByNameForOwner('superAccount', $super); AddressGeoCodeTestHelper::createAndRemoveAccountWithAddress($super); //Setup default dashboard. Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; //Setup test data owned by the super user. LeadTestHelper::createLeadbyNameForOwner('superLead', $super); //Setup default dashboard. Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super); //Setup test marketingList MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description', 'first', '*****@*****.**'); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $testGroup1 = new Group(); $testGroup1->name = 'testGroup1'; assert($testGroup1->save()); // Not Coding Standard $testGroup2 = new Group(); $testGroup2->name = 'testGroup2'; assert($testGroup2->save()); // Not Coding Standard }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; $aUser = UserTestHelper::createBasicUser('aUser'); $aUser->setRight('UsersModule', UsersModule::RIGHT_LOGIN_VIA_WEB); $saved = $aUser->save(); if (!$saved) { throw new NotSupportedException(); } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; $everyoneGroup = Group::getByName(Group::EVERYONE_GROUP_NAME); assert($everyoneGroup->save()); // Not Coding Standard $group1 = new Group(); $group1->name = 'Group1'; assert($group1->save()); // Not Coding Standard //Setup test data owned by the super user. AccountTestHelper::createAccountByNameForOwner('superAccount', $super); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); SecurityTestHelper::createSuperAdmin(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; Currency::makeBaseCurrency(); //Create a account for testing. $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super); //Create a opportunity for testing. OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp', $super, $account); //Create a two contacts for testing. ContactTestHelper::createContactWithAccountByNameForOwner('superContact1', $super, $account); ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account); //Create a note for testing. NoteTestHelper::createNoteWithOwnerAndRelatedAccount('superNote', $super, $account); }