/** * @test * @dataProvider dataProvider */ public function testIsOrderSyncEnabled($is_production_domain, $config_flag, $result) { $data_helper = $this->getHelperMock('klevu_search', array("isProductionDomain")); $data_helper->expects($this->once())->method("isProductionDomain")->will($this->returnValue($is_production_domain)); $this->replaceByMock("helper", "klevu_search", $data_helper); $this->clearConfigCache(); $this->getConfig()->saveConfig("klevu_search/order_sync/enabled", $config_flag)->cleanCache(); $this->assertEquals($result, $this->helper->isOrderSyncEnabled()); }
/** * @test * @dataProvider dataProvider */ public function testIsOrderSyncEnabled($config_flag, $result) { $this->getConfig()->saveConfig("klevu_search/order_sync/enabled", $config_flag)->cleanCache(); $this->assertEquals($result, $this->helper->isOrderSyncEnabled()); }