UrlAliasTest.php

Same filename in this branch
  1. 11.x core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
Same filename in other branches
  1. 9 core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
  2. 9 core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php
  3. 8.9.x core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
  4. 8.9.x core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php
  5. 10 core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
  6. 10 core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php

Namespace

Drupal\Tests\path\Kernel\Plugin\migrate\source\d7

File

core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\path\Kernel\Plugin\migrate\source\d7;

use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;

/**
 * Tests the d7_url_alias source plugin.
 *
 * @covers \Drupal\path\Plugin\migrate\source\d7\UrlAlias
 * @group path
 */
class UrlAliasTest extends MigrateSqlSourceTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'migrate_drupal',
        'path',
    ];
    
    /**
     * {@inheritdoc}
     */
    public static function providerSource() {
        $tests = [];
        // The source data.
        $tests[0]['source_data']['url_alias'] = [
            [
                'pid' => 1,
                'source' => 'node/1',
                'alias' => 'test-article',
                'language' => 'en',
            ],
            [
                'pid' => 2,
                'source' => 'node/2',
                'alias' => 'another-alias',
                'language' => 'en',
            ],
        ];
        // The expected results.
        $tests[0]['expected_data'] = $tests[0]['source_data']['url_alias'];
        return $tests;
    }

}

Classes

Title Deprecated Summary
UrlAliasTest Tests the d7_url_alias source plugin.

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