You are here

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

Ensures that inbound and outbound paths are converted correctly.

File

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

Class

SubPathautoFunctionalTest
Class SubPathautoFunctionalTest.

Namespace

Drupal\Tests\subpathauto\Functional

Code

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