You are here

public function SubPathautoFunctionalTest::testWithLanguagePrefix in Sub-pathauto (Sub-path URL Aliases) 8

Ensures that language prefix is handled correctly.

File

tests/src/Functional/SubPathautoFunctionalTest.php, line 83

Class

SubPathautoFunctionalTest
Class SubPathautoFunctionalTest.

Namespace

Drupal\Tests\subpathauto\Functional

Code

public function testWithLanguagePrefix() {
  $this
    ->drupalGet('/fi/kittens');
  $this
    ->assertSession()
    ->linkByHrefExists('/fi/kittens/edit', 0, 'Local task link path that is subpath for an alias lead to correct URL when language prefix exists.');
  $this
    ->clickLink('Edit');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->linkByHrefExists('/fi/kittens', 0, 'Local task link with alias lead to correct URL when language prefix exists..');
  $this
    ->assertSession()
    ->linkByHrefExists('/fi/kittens/delete', 0, 'Local task link path that is subpath for an alias lead to correct URL when language prefix exists..');
}