protected function setUp() { $this->_objectHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); $this->_scopeConfig = $this->getMock('Magento\\Framework\\App\\Config\\ScopeConfigInterface'); $this->_model = $this->_objectHelper->getObject('Magento\\Catalog\\Model\\Category\\Attribute\\Backend\\Sortby', ['scopeConfig' => $this->_scopeConfig]); $this->_attribute = $this->getMock('Magento\\Eav\\Model\\Entity\\Attribute\\AbstractAttribute', ['getName', '__call', 'isValueEmpty', 'getEntity', 'getFrontend', '__wakeup', 'getIsRequired', 'getIsUnique'], [], '', false); $this->_model->setAttribute($this->_attribute); }
protected function setUp() { $this->_objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_scopeConfig = $this->getMock('Magento\\Framework\\App\\Config\\ScopeConfigInterface'); $this->_model = $this->_objectHelper->getObject('Magento\\Catalog\\Model\\Category\\Attribute\\Backend\\Sortby', array('scopeConfig' => $this->_scopeConfig)); $this->_attribute = $this->getMockForAbstractClass('Magento\\Eav\\Model\\Entity\\Attribute\\AbstractAttribute', array(), '', false, true, true, array('getName', '__call', 'isValueEmpty', 'getEntity', 'getFrontend', '__wakeup')); $this->_model->setAttribute($this->_attribute); }