Beispiel #1
0
 /**
  * @test
  * @dataProvider dataProvider
  */
 public function testIsProductSyncEnabled($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/product_sync/enabled", $config_flag)->cleanCache();
     $this->assertEquals($result, $this->helper->isProductSyncEnabled());
 }
Beispiel #2
0
 /**
  * @test
  * @dataProvider dataProvider
  */
 public function testIsProductSyncEnabled($config_flag, $result)
 {
     $this->clearConfigCache();
     $this->getConfig()->saveConfig("klevu_search/product_sync/enabled", $config_flag)->cleanCache();
     $this->assertEquals($result, $this->helper->isProductSyncEnabled());
 }