function MigrateUrlAliasTest::assertPath

Same name in other branches
  1. 9 core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php \Drupal\Tests\path\Kernel\Migrate\d6\MigrateUrlAliasTest::assertPath()
  2. 8.9.x core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php \Drupal\Tests\path\Kernel\Migrate\d6\MigrateUrlAliasTest::assertPath()
  3. 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.

@internal

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::checkUrlMigration in core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
Checks the migration results.

File

core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php, line 63

Class

MigrateUrlAliasTest
URL alias migration.

Namespace

Drupal\Tests\path\Kernel\Migrate\d6

Code

private function assertPath(int $pid, array $conditions, PathAliasInterface $path_alias) : void {
    $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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.