Exemplo n.º 1
0
 public function testSettingInvalidCookieDomain2()
 {
     $validatorMock = $this->getMockBuilder('Magento\\Framework\\Validator\\ValidatorInterface')->disableOriginalConstructor()->getMock();
     $validatorMock->expects($this->any())->method('isValid')->willReturn(false);
     $this->getModel($validatorMock);
     $preVal = $this->config->getCookieDomain();
     $this->config->setCookieDomain('D:\\WINDOWS\\System32\\drivers\\etc\\hosts');
     $this->assertEquals($preVal, $this->config->getCookieDomain());
 }
Exemplo n.º 2
0
 public function testSettingInvalidCookieDomain2()
 {
     $preVal = $this->_model->getCookieDomain();
     $this->_model->setCookieDomain('D:\\WINDOWS\\System32\\drivers\\etc\\hosts');
     $this->assertEquals($preVal, $this->_model->getCookieDomain());
 }
Exemplo n.º 3
0
 public function testSettingInvalidCookieDomainRaisesException2()
 {
     $this->setExpectedException('\\InvalidArgumentException', 'does not match the expected structure for a DNS hostname');
     $this->config->setCookieDomain('D:\\WINDOWS\\System32\\drivers\\etc\\hosts');
 }