/** * @param \Magento\Eav\Helper\Data $eavData */ public function __construct(\Magento\Eav\Helper\Data $eavData) { $this->_eavData = $eavData; //set data haystack $haystack = $this->_eavData->getInputTypesValidatorData(); //reset message template and set custom $this->_messageTemplates = null; $this->_initMessageTemplates(); //parent construct with options parent::__construct(['haystack' => $haystack, 'strict' => true]); }
public function testGetInputTypesValidatorData() { $configValue = 'config_value'; $this->scopeConfigMock->expects($this->once())->method('getValue')->with(\Magento\Eav\Helper\Data::XML_PATH_VALIDATOR_DATA_INPUT_TYPES, ScopeInterface::SCOPE_STORE)->willReturn($configValue); $this->assertEquals($configValue, $this->helper->getInputTypesValidatorData()); }