22 $this->productsFactoryMock = $this->createPartialMock(
26 $this->model = new \Magento\Catalog\Model\ProductManagement(
27 $this->productsFactoryMock
36 $this->productsFactoryMock
37 ->expects($this->once())
39 ->willReturn($productsMock);
41 ->expects($this->once())
42 ->method(
'addAttributeToFilter')
43 ->with(
'status', $statusEnabled)
46 ->expects($this->once())
48 ->willReturn(
'expected');
52 $this->model->getCount($statusEnabled)
61 $this->productsFactoryMock
62 ->expects($this->once())
64 ->willReturn($productsMock);
66 ->expects($this->once())
67 ->method(
'addAttributeToFilter')
68 ->with(
'status', $statusDisabled)
71 ->expects($this->once())
73 ->willReturn(
'expected');
77 $this->model->getCount($statusDisabled)