/** * @param array $config * @param bool $expected * @dataProvider verifyNotificationDataProvider */ public function testVerifyNotification($config, $expected) { $qty = $config['qty']; $defaultQty = $config['default_qty']; $useConfigNotifyStockQty = $config['use_config_notify_stock_qty']; $notifyStockQty = $config['notify_stock_qty']; $this->setDataArrayValue('qty', $defaultQty); $this->setDataArrayValue('use_config_notify_stock_qty', $useConfigNotifyStockQty); if ($useConfigNotifyStockQty) { $this->scopeConfig->expects($this->any())->method('getValue')->with($this->equalTo(Item::XML_PATH_NOTIFY_STOCK_QTY), $this->equalTo(\Magento\Store\Model\ScopeInterface::SCOPE_STORE))->will($this->returnValue($notifyStockQty)); } else { $this->setDataArrayValue('notify_stock_qty', $notifyStockQty); } $this->assertSame($expected, $this->item->verifyNotification($qty)); }