protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Catalog\\Model\\Layer\\Filter\\Price\\Algorithm'); $this->_layer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Catalog\\Model\\Layer\\Category'); $this->_filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Catalog\\Model\\Layer\\Filter\\Price', array('layer' => $this->_layer)); $this->_filter->setAttributeModel(new \Magento\Framework\Object(array('attribute_code' => 'price'))); }
public function testGetItems() { $this->target->setAttributeModel($this->attribute); $attributeCode = 'attributeCode'; $this->attribute->expects($this->any())->method('getAttributeCode')->will($this->returnValue($attributeCode)); $this->algorithm->expects($this->any())->method('getItemsData')->will($this->returnValue([])); $this->target->getItems(); }