private function MigrateUrlAliasTest::assertPath in Drupal 8
Same name and namespace in other branches
- 9 core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php \Drupal\Tests\path\Kernel\Migrate\d6\MigrateUrlAliasTest::assertPath()
- 10 core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php \Drupal\Tests\path\Kernel\Migrate\d6\MigrateUrlAliasTest::assertPath()
Asserts that a path alias matches a set of conditions.
Parameters
int $pid: The path alias ID.
array $conditions: The path conditions.
\Drupal\path_alias\PathAliasInterface $path_alias: The path alias.
1 call to MigrateUrlAliasTest::assertPath()
- MigrateUrlAliasTest::testUrlAlias in core/
modules/ path/ tests/ src/ Kernel/ Migrate/ d6/ MigrateUrlAliasTest.php - Test the url alias migration.
File
- core/
modules/ path/ tests/ src/ Kernel/ Migrate/ d6/ MigrateUrlAliasTest.php, line 62
Class
- MigrateUrlAliasTest
- URL alias migration.
Namespace
Drupal\Tests\path\Kernel\Migrate\d6Code
private function assertPath($pid, $conditions, PathAliasInterface $path_alias) {
$this
->assertSame($pid, (int) $path_alias
->id());
$this
->assertSame($conditions['alias'], $path_alias
->getAlias());
$this
->assertSame($conditions['langcode'], $path_alias
->get('langcode')->value);
$this
->assertSame($conditions['path'], $path_alias
->getPath());
}