Example #1
0
 /**
  * Validate a domain name value
  *
  * @return void
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 public function beforeSave()
 {
     $value = $this->getValue();
     if (!empty($value) && !$this->configValidator->isValid($value)) {
         throw new \Magento\Framework\Exception\LocalizedException(__('Invalid cookie path'));
     }
 }
 public function testValidPath()
 {
     $path = '/';
     $this->assertTrue($this->model->isValid($path));
 }