/** * @test */ public function testGetJsApiKeyProduction() { $api_key = 'klevu-14255510895641069'; $this->getConfig()->saveConfig("klevu_search/general/js_api_key", $api_key)->cleanCache(); $this->clearConfigCache(); $this->assertEquals($api_key, $this->helper->getJsApiKey()); }
/** * @test */ public function testGetJsApiKeyStaging() { $api_key = "test-js-api-key"; $this->mockIsProductionDomain(false); $this->assertEquals(null, $this->helper->getJsApiKey()); $this->getConfig()->saveConfig("klevu_search/general/test_js_api_key", $api_key)->cleanCache(); $this->clearConfigCache(); $this->assertEquals($api_key, $this->helper->getJsApiKey()); }