You are here

protected function Redirect404TestBase::assertLanguageInTableBody in Redirect 8

Passes if the language of the 404 path IS found on the loaded page.

Because assertText() checks also in the Language select options, this specific assertion in the redirect 404 table body is needed.

Parameters

string $language: The language to assert in the redirect 404 table body.

1 call to Redirect404TestBase::assertLanguageInTableBody()
Fix404RedirectUILanguageTest::testFix404RedirectList in modules/redirect_404/tests/src/Functional/Fix404RedirectUILanguageTest.php
Tests the fix 404 pages workflow with language and content translation.

File

modules/redirect_404/tests/src/Functional/Redirect404TestBase.php, line 72

Class

Redirect404TestBase
This class provides methods specifically for testing redirect 404 paths.

Namespace

Drupal\Tests\redirect_404\Functional

Code

protected function assertLanguageInTableBody($language) {
  $this
    ->assertSession()
    ->elementContains('css', 'table tbody', $language);
}