Example #1
0
 /**
  * @magentoAppIsolation enabled
  */
 public function testDefaultConfiguration()
 {
     $this->assertEquals(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\Filesystem')->getPath('session'), $this->_model->getSavePath());
     $this->assertEquals(\Magento\Framework\Session\Config::COOKIE_LIFETIME_DEFAULT, $this->_model->getCookieLifetime());
     $this->assertEquals($this->_cacheLimiter, $this->_model->getCacheLimiter());
     $this->assertEquals('/', $this->_model->getCookiePath());
     $this->assertEquals('localhost', $this->_model->getCookieDomain());
     $this->assertEquals(false, $this->_model->getCookieSecure());
     $this->assertEquals(true, $this->_model->getCookieHttpOnly());
     $this->assertEquals($this->_model->getSavePath(), $this->_model->getOption('save_path'));
 }
 public function testCookieHttpOnlyIsMutable()
 {
     $this->getModel($this->validatorMock);
     $value = ini_get('session.cookie_httponly') ? false : true;
     $this->config->setCookieHttpOnly($value);
     $this->assertEquals($value, $this->config->getCookieHttpOnly());
 }
Example #3
0
 public function testSetCookieHttpOnlyInOptions()
 {
     $this->_model->setCookieHttpOnly(true);
     $this->assertTrue($this->_model->getCookieHttpOnly());
 }