You are here

public function LiftLinkTest::testLinkNotInToolbar in Acquia Lift Connector 8.4

File

tests/src/Functional/LiftLinkTest.php, line 115

Class

LiftLinkTest
Test Acquia Lift Toolbar Link.

Namespace

Drupal\Tests\acquia_lift\Functional

Code

public function testLinkNotInToolbar() {
  $permissions = [
    'access toolbar',
  ];

  // User to set up acquia_lift.
  $linkUser = $this
    ->drupalCreateUser($permissions);
  $this
    ->drupalLogin($linkUser);

  // Check if Acquia Lift Link is available on the node that we created
  $node = $this
    ->drupalCreateNode();
  $this
    ->drupalGet($node
    ->toUrl());

  // Assert that the Acquia Lift link ID is not present in the HTML.
  $this
    ->assertNoRaw('id="openLiftLink"');

  // Set valid settings
  $this
    ->setValidSettings();
  $this
    ->drupalGet($node
    ->toUrl());

  // Assert that the Acquia Lift link ID is not present in the HTML.
  $this
    ->assertNoRaw('id="openLiftLink"');
}