/** * @test */ public function testGetRestApiKeyProduction() { $api_key = 'a2xldnUtMTQyNTU1MTA4OTU2NDEwNjk6S2xldnUtZmo4NzQ3cHUxMg=='; $this->getConfig()->saveConfig("klevu_search/general/rest_api_key", $api_key)->cleanCache(); $this->clearConfigCache(); $this->assertEquals($api_key, $this->helper->getRestApiKey()); }
/** * @test */ public function testGetRestApiKeyStaging() { $api_key = "test-rest-api-key"; $this->mockIsProductionDomain(false); $this->assertEquals(null, $this->helper->getRestApiKey()); $this->getConfig()->saveConfig("klevu_search/general/test_rest_api_key", $api_key)->cleanCache(); $this->clearConfigCache(); $this->assertEquals($api_key, $this->helper->getRestApiKey()); }