/** * Performs user login */ protected function _login() { Mage::getSingleton('Mage_Backend_Model_Url')->turnOffSecretKey(); $this->_auth = Mage::getSingleton('Mage_Backend_Model_Auth'); $this->_auth->login(Magento_Test_Bootstrap::ADMIN_NAME, Magento_Test_Bootstrap::ADMIN_PASSWORD); $this->_session = $this->_auth->getAuthStorage(); }
protected function setUp() { parent::setUp(); Mage::app()->loadDiConfiguration(Mage_Core_Model_App_Area::AREA_ADMINHTML); Mage::getSingleton('Mage_Backend_Model_Url')->turnOffSecretKey(); $this->_auth = Mage::getModel('Mage_Backend_Model_Auth'); $this->_session = $this->_auth->getAuthStorage(); $this->_auth->login(Magento_Test_Bootstrap::ADMIN_NAME, Magento_Test_Bootstrap::ADMIN_PASSWORD); }
/** * Disabled form security in order to prevent exit from the app * @magentoConfigFixture current_store admin/security/session_lifetime 59 */ public function testIsLoggedInWithIgnoredLifetime() { $this->_model->login(Magento_Test_Bootstrap::ADMIN_NAME, Magento_Test_Bootstrap::ADMIN_PASSWORD); $this->assertTrue($this->_model->isLoggedIn()); $this->_model->getAuthStorage()->setUpdatedAt(time() - 101); $this->assertTrue($this->_model->isLoggedIn()); }
public static function loginAdmin() { $auth = new Mage_Backend_Model_Auth(); self::$_adminSession = $auth->getAuthStorage(); $auth->login(Magento_Test_Bootstrap::ADMIN_NAME, Magento_Test_Bootstrap::ADMIN_PASSWORD); }