public function BambooTwigTestBase::assertLinkLabelExist in Bamboo Twig 8
Same name and namespace in other branches
- 8.5 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertLinkLabelExist()
- 8.2 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertLinkLabelExist()
- 8.3 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertLinkLabelExist()
- 8.4 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertLinkLabelExist()
Passes if a link with the specified label is found.
An optional link index may be passed.
Parameters
string $label: Text between the anchor tags.
int $index: (optional) Link position counting from zero.
Throws
\Behat\Mink\Exception\ExpectationException Thrown when element doesn't exist, or the link label is a different one.
See also
\Behat\Mink\WebAssert::linkExists
1 call to BambooTwigTestBase::assertLinkLabelExist()
- BambooTwigLoaderTest::testEntity in tests/
src/ Functional/ BambooTwigLoadersTest.php - @covers Drupal\bamboo_twig_loaders\TwigExtension\Loader::loadEntity
File
- tests/
src/ Functional/ BambooTwigTestBase.php, line 94
Class
- BambooTwigTestBase
- Has some additional helper methods to make test code more readable.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function assertLinkLabelExist($label, $index = 0) {
$this
->assertSession()
->linkExists($label, $index = 0);
}