public function BrowserTestBaseTest::testInvalidLinkExistsExact in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testInvalidLinkExistsExact()
- 9 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testInvalidLinkExistsExact()
Tests linkExistsExact() functionality fail.
See also
\Drupal\Tests\WebAssert::linkExistsExact()
File
- core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 221
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
public function testInvalidLinkExistsExact() {
$this
->drupalGet('test-pipe-char');
$this
->expectException(ExpectationException::class);
$this
->expectExceptionMessage('Link with label foo|bar found');
$this
->assertSession()
->linkExistsExact('foo|bar');
}