17 private $objectManager;
29 $this->stockStatusFactory = $this->getMockBuilder(
32 ->setMethods([
'create'])
33 ->disableOriginalConstructor()
36 $this->model = $this->objectManager->getObject(
39 'stockStatusFactory' => $this->stockStatusFactory,
47 ->setMethods([
'addAttributeToFilter'])
48 ->disableOriginalConstructor()
52 ->method(
'addAttributeToFilter')
54 ->will($this->returnSelf());
56 $stockStatusResource = $this->getMockBuilder(\
Magento\CatalogInventory\Model\
ResourceModel\Stock\Status::class)
57 ->setMethods([
'addStockDataToCollection'])
58 ->disableOriginalConstructor()
60 $stockStatusResource->expects($this->once())
61 ->method(
'addStockDataToCollection')
63 ->will($this->returnSelf());
65 $this->stockStatusFactory
66 ->expects($this->once())
68 ->will($this->returnValue($stockStatusResource));