You are here

public function HelpMessageHelperTest::setUp in Acquia Lift Connector 8

Overrides UnitTestCase::setUp

File

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

Class

HelpMessageHelperTest
HelpMessageHelper Test.

Namespace

Drupal\Tests\acquia_lift\Service\Helper

Code

public function setUp() {
  parent::setUp();
  $this->configFactory = $this
    ->getMock('Drupal\\Core\\Config\\ConfigFactoryInterface');
  $this->linkGenerator = $this
    ->getMock('Drupal\\Core\\Utility\\LinkGeneratorInterface');
  $this->settings = $this
    ->getMockBuilder('Drupal\\Core\\Config\\ImmutableConfig')
    ->disableOriginalConstructor()
    ->getMock();
  $this->configFactory
    ->expects($this
    ->once())
    ->method('get')
    ->with('acquia_lift.settings')
    ->willReturn($this->settings);
  $this->linkGenerator
    ->expects($this
    ->at(0))
    ->method('generate')
    ->with('Documentation')
    ->willReturn('a_documentation_link');
}