You are here

public function PathRedirectTest::testPathRedirect in Redirect 8

Same name in this branch
  1. 8 tests/src/Kernel/Migrate/d6/PathRedirectTest.php \Drupal\Tests\redirect\Kernel\Migrate\d6\PathRedirectTest::testPathRedirect()
  2. 8 tests/src/Kernel/Migrate/d7/PathRedirectTest.php \Drupal\Tests\redirect\Kernel\Migrate\d7\PathRedirectTest::testPathRedirect()

Tests the Drupal 7 path redirect to Drupal 8 migration.

File

tests/src/Kernel/Migrate/d7/PathRedirectTest.php, line 64
Contains \Drupal\Tests\redirect\Kernel\Migrate\d7\PathRedirectTest.

Class

PathRedirectTest
Tests the d7_path_redirect source plugin.

Namespace

Drupal\Tests\redirect\Kernel\Migrate\d7

Code

public function testPathRedirect() {
  $this
    ->assertEntity(5, '/test/source/url', 'base:test/redirect/url', '301');
  $this
    ->assertEntity(7, '/test/source/url2', 'http://test/external/redirect/url?foo=bar&biz=buz#fragment-1', '307');
}