public function setup() { parent::setup(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; self::$user->forget(); self::$user = User::getByUsername('steve'); }
public function setup() { parent::setup(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; if (EmailMessageTestHelper::isSetEmailAccountsTestConfiguration()) { $user = User::getByUsername('steve'); $user->primaryEmail->emailAddress = Yii::app()->params['emailTestAccounts']['userImapSettings']['imapUsername']; $this->assertTrue($user->save()); } }
public function setup() { ForgetAllCacheUtil::forgetAllCaches(); //Special situation to deal with email box and ensuring the user cache doesn't get corrupted parent::setup(); $super = User::getByUsername('super'); Yii::app()->user->userModel = $super; if (EmailMessageTestHelper::isSetEmailAccountsTestConfiguration()) { $user = User::getByUsername('steve'); $user->primaryEmail->emailAddress = Yii::app()->params['emailTestAccounts']['userImapSettings']['imapUsername']; $this->assertTrue($user->save()); } else { $this->markTestSkipped(Zurmo::t('EmailMessagesModule', 'Test email settings are not configured in perInstanceTest.php file.')); } }
public function setup() { parent::setup(); Yii::app()->user->userModel = User::getByUsername('super'); }
public function teardown() { parent::setup(); }