assertPath example


  public function testUrlAlias() {
    $id_map = $this->getMigration('d6_url_alias')->getIdMap();
    // Test that the field exists.     $conditions = [
      'path' => '/node/1',
      'alias' => '/alias-one',
      'langcode' => 'af',
    ];
    $path_alias = $this->loadPathAliasByConditions($conditions);
    $this->assertPath(1, $conditions$path_alias);
    $this->assertSame([['1']]$id_map->lookupDestinationIds([$path_alias->id()]), "Test IdMap");

    $conditions = [
      'path' => '/node/2',
      'alias' => '/alias-two',
      'langcode' => 'en',
    ];
    $path_alias = $this->loadPathAliasByConditions($conditions);
    $this->assertPath(2, $conditions$path_alias);

    // Test that we can re-import using the UrlAlias destination.
Home | Imprint | This part of the site doesn't use cookies.