You are here

public function HelpMessageHelperTest::testGetMessageAdminSettingsFormFullSettings in Acquia Lift Connector 8

Tests the getMessage() method - AdminSettingsForm, full settings.

@covers ::getMessage

@dataProvider providerRouteNames

Parameters

string $route_name:

File

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

Class

HelpMessageHelperTest
HelpMessageHelper Test.

Namespace

Drupal\Tests\acquia_lift\Service\Helper

Code

public function testGetMessageAdminSettingsFormFullSettings($route_name) {
  $full_settings = $this
    ->getValidCredentialSettings();
  $this->settings
    ->expects($this
    ->once())
    ->method('get')
    ->with('credential')
    ->willReturn($full_settings);
  $this->linkGenerator
    ->expects($this
    ->at(1))
    ->method('generate')
    ->with('Acquia Lift Web Admin')
    ->willReturn('a_web_admin_link');
  $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, and control your web services settings at a_web_admin_link.', $message);
}