function LanguagePathMonolingualTest::testPageLinks

Verifies that links do not have language prefixes in them.

File

drupal/core/modules/language/lib/Drupal/language/Tests/LanguagePathMonolingualTest.php, line 66
Definition of Drupal\language\Tests\LanguagePathMonolingualTest.

Class

LanguagePathMonolingualTest
Tests that paths are not prefixed on a monolingual site.

Namespace

Drupal\language\Tests

Code

function testPageLinks() {

  // Navigate to 'admin/config' path.
  $this
    ->drupalGet('admin/config');

  // Verify that links in this page do not have a 'fr/' prefix.
  $this
    ->assertNoLinkByHref('/fr/', 'Links do not contain language prefix');

  // Verify that links in this page can be followed and work.
  $this
    ->clickLink(t('Languages'));
  $this
    ->assertResponse(200, 'Clicked link results in a valid page');
  $this
    ->assertText(t('Add language'), 'Page contains the add language text');
}