_attributeConfig = $this->createMock(\Magento\Catalog\Model\Attribute\Config::class); $this->_model = new \Magento\Quote\Model\Quote\Config($this->_attributeConfig); } public function testGetProductAttributes() { $attributes = ['attribute_one', 'attribute_two']; $this->_attributeConfig->expects( $this->once() )->method( 'getAttributeNames' )->with( 'quote_item' )->will( $this->returnValue($attributes) ); $this->assertEquals($attributes, $this->_model->getProductAttributes()); } }