You are here

public function LinkCheckerLinkAccessTest::linkAccessAssertMessage in Link checker 8

Constructs an assert message to display which link access was tested.

Parameters

string $operation: The operation to check access for.

bool $result: Whether access should be granted or not.

Return value

string An assert message string which contains information in plain English about the link access permission test that was performed.

1 call to LinkCheckerLinkAccessTest::linkAccessAssertMessage()
LinkCheckerLinkAccessTest::assertLinkAccess in tests/src/Kernel/LinkCheckerLinkAccessTest.php
Asserts that link access correctly grants or denies access.

File

tests/src/Kernel/LinkCheckerLinkAccessTest.php, line 225

Class

LinkCheckerLinkAccessTest
Tests basic linkchecker link access functionality.

Namespace

Drupal\Tests\linkchecker\Kernel

Code

public function linkAccessAssertMessage($operation, $result) {
  return new FormattableMarkup('LinkCheckerLink access returns @result with operation %op.', [
    '@result' => $result ? 'true' : 'false',
    '%op' => $operation,
  ]);
}