コード例 #1
0
 /**
  * Resources belonging to a module within a compound namespace must pass the validation
  */
 public function testValidateParamResourceCompoundModuleNamespace()
 {
     $this->_model->validateParam('resource', 'TheCompoundNamespace_TheCompoundModule::resource');
 }
コード例 #2
0
ファイル: Item.php プロジェクト: rorteg/magento2
 /**
  * Set Item config dependency
  *
  * @param string $configPath
  * @return Mage_Backend_Model_Menu_Item
  * @throws InvalidArgumentException
  */
 public function setConfigDependency($configPath)
 {
     $this->_validator->validateParam('depenedsOnConfig', $configPath);
     $this->_dependsOnConfig = $configPath;
     return $this;
 }
コード例 #3
0
ファイル: ValidatorTest.php プロジェクト: nemphys/magento2
 /**
  * @expectedException InvalidArgumentException
  */
 public function testValidateParamValidatesPrimitiveValues()
 {
     $this->_model->validateParam('toolTip', '/:');
 }