You are here

public function HelpMessageHelperTest::testGetMessageAdminSettingsFormNoApiUrl in Acquia Lift Connector 8

Tests the getMessage() method - AdminSettingsForm, no API URL setting.

@covers ::getMessage

@dataProvider providerRouteNames

Parameters

string $route_name:

File

tests/src/Unit/Service/Helper/HelpMessageHelperTest.php, line 101
Contains \Drupal\Tests\acquia_lift\Service\Helper\HelpMessageHelperTest.

Class

HelpMessageHelperTest
HelpMessageHelper Test.

Namespace

Drupal\Tests\acquia_lift\Service\Helper

Code

public function testGetMessageAdminSettingsFormNoApiUrl($route_name) {
  $missing_api_url_settings = $this
    ->getValidCredentialSettings();
  unset($missing_api_url_settings['api_url']);
  $this->settings
    ->expects($this
    ->once())
    ->method('get')
    ->with('credential')
    ->willReturn($missing_api_url_settings);
  $help_message_helper = new HelpMessageHelper($this->configFactory, $this->linkGenerator);
  $message = $help_message_helper
    ->getMessage($route_name);
  $this
    ->assertEquals('You can find more info in a_documentation_link.', $message);
}