Ejemplo n.º 1
0
 /**
  * @expectedException \Magento\Framework\Exception\LocalizedException
  * @expectedExceptionMessage This identifier is reserved for "CMS No Cookies Page" in configuration.
  */
 public function testBeforeSaveNoCookiesIdentifier()
 {
     $this->model->setId(1);
     $this->model->setOrigData('identifier', 'no-cookies');
     $this->model->setIdentifier('no-cookies2');
     $this->scopeConfigMock->expects($this->atLeastOnce())->method('getValue')->willReturnMap([[\Magento\Cms\Helper\Page::XML_PATH_NO_COOKIES_PAGE, ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null, 'no-cookies']]);
     $this->model->beforeSave();
 }