diff --git a/src/Tests/ApiKeyConfigurationTest.php b/src/Tests/ApiKeyConfigurationTest.php index 48c2888..1e414e6 100755 --- a/src/Tests/ApiKeyConfigurationTest.php +++ b/src/Tests/ApiKeyConfigurationTest.php @@ -40,17 +40,17 @@ class ApiKeyConfigurationTest extends WebTestBase { } /** - * Tests that the Google Vision API Key is set in the admin config page. + * Test to implement a runtime requirement checking if API key is not set. */ function testKeyConfiguration() { $this->drupalGet(Url::fromRoute('google_vision.settings')); $this->assertResponse(200); - - $config = $this->container->get('config.factory')->get('google_vision.settings'); $this->assertFieldByName('api_key', '', 'The API key is not set'); $this->drupalGet(Url::fromRoute('system.status')); $this->assertResponse(200); $this->assertText('Google Vision API key is not set and it is required for some functionalities to work.', 'The content exists on the report page'); + $this->assertLink('Google Vision module settings page', 0, 'Link to the api key configuration page found'); + $this->assertLinkByHref(Url::fromRoute('google_vision.settings')->toString()); } }