You are here

protected function WebformAssertLegacyTrait::assertLinkByHref in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::assertLinkByHref()

Passes if a link containing a given href (part) is found.

Parameters

string $href: The full or partial value of the 'href' attribute of the anchor tag.

int $index: Link position counting from zero.

13 calls to WebformAssertLegacyTrait::assertLinkByHref()
WebformAccessSubmissionPermissionsTest::testPermissions in tests/src/Functional/Access/WebformAccessSubmissionPermissionsTest.php
Test webform submission access permissions.
WebformElementTableTest::testTable in tests/src/Functional/Element/WebformElementTableTest.php
Tests table elements.
WebformEntityPrintFunctionalTest::testEntityPrint in modules/webform_entity_print/tests/src/Functional/WebformEntityPrintFunctionalTest.php
Test entity print.
WebformNodeAccessPermissionsTest::testAccessPermissions in modules/webform_node/tests/src/Functional/Access/WebformNodeAccessPermissionsTest.php
Tests webform node access permissions.
WebformNodeReferencesTest::testReferences in modules/webform_node/tests/src/Functional/WebformNodeReferencesTest.php
Tests webform node references.

... See full list

File

tests/src/Traits/WebformAssertLegacyTrait.php, line 373

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function assertLinkByHref($href, $index = 0) {
  $this
    ->assertSession()
    ->linkByHrefExists($href, $index);
}