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(); 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 = User::getByUsername('super'); Yii::app()->user->userModel = $this->user; $campaigns = Campaign::getAll(); $this->campaign = $campaigns[0]; }
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 function setUp() { parent::setUp(); $this->super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); $savedWorkflows = SavedWorkflow::getAll(); $this->savedWorkflow = $savedWorkflows[0]; $models = WorkflowModelTestItem::getAll(); $this->model = $models[0]; }
public function setUp() { parent::setUp(); list(, $this->databaseHostname, $this->databasePort, $this->databaseName) = array_values(RedBeanDatabase::getDatabaseInfoFromDsnString(Yii::app()->db->connectionString)); $this->databaseUsername = Yii::app()->db->username; $this->databasePassword = Yii::app()->db->password; $this->superUserPassword = '******'; $this->instanceRoot = INSTANCE_ROOT; $this->perInstanceFile = "{$this->instanceRoot}/protected/config/perInstanceTest.php"; $this->debugFile = "{$this->instanceRoot}/protected/config/debugTest.php"; if (is_file($this->perInstanceFile)) { $this->perInstanceConfigContents = file_get_contents($this->perInstanceFile); unlink($this->perInstanceFile); } if (is_file($this->debugFile)) { $this->debugConfigContents = file_get_contents($this->debugFile); unlink($this->debugFile); } Yii::app()->gameHelper->muteScoringModelsOnSave(); }
public function setUp() { parent::setUp(); $this->user = $this->logoutCurrentUserLoginNewUserAndGetByUsername('nobody'); Yii::app()->user->userModel = $this->user; }
public function setUp() { parent::setUp(); $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); }
public function setUp() { parent::setUp(); $this->user = $this->logoutCurrentUserLoginNewUserAndGetByUsername($this->getTestUsername()); }
public function setUp() { parent::setUp(); $this->user = User::getByUsername('nobody'); Yii::app()->user->userModel = $this->user; }
public function setUp() { parent::setUp(); $this->rules = new ConversationMashableInboxRules(); }
/** * Set the processReadMungeAsWriteMungeValue as false, so we can do tests using permission READ */ public function setUp() { parent::setUp(); $this->processReadMungeAsWriteMungeValue = Yii::app()->params['processReadMungeAsWriteMunge']; Yii::app()->params['processReadMungeAsWriteMunge'] = false; }
public function setUp() { parent::setUp(); $this->rules = new NotificationMashableInboxRules(); }