function LegacyAliasStorageTest::sampleUrlAliases

Returns an array of URL aliases for testing.

Return value

array of URL alias definitions.

1 call to LegacyAliasStorageTest::sampleUrlAliases()
LegacyAliasStorageTest::testCRUD in core/tests/Drupal/KernelTests/Core/Path/LegacyAliasStorageTest.php
@covers ::load @covers ::save @covers ::delete @expectedDeprecation \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the "path_alias.repository" service instead, or the entity storage handler…

File

core/tests/Drupal/KernelTests/Core/Path/LegacyAliasStorageTest.php, line 124

Class

LegacyAliasStorageTest
@coversDefaultClass \Drupal\Core\Path\AliasStorage @group path @group legacy

Namespace

Drupal\KernelTests\Core\Path

Code

protected function sampleUrlAliases() {
    return [
        [
            'source' => '/node/1',
            'alias' => '/alias_for_node_1_en',
            'langcode' => 'en',
        ],
        [
            'source' => '/node/2',
            'alias' => '/alias_for_node_2_en',
            'langcode' => 'en',
        ],
        [
            'source' => '/node/1',
            'alias' => '/alias_for_node_1_fr',
            'langcode' => 'fr',
        ],
        [
            'source' => '/node/1',
            'alias' => '/alias_for_node_1_und',
            'langcode' => 'und',
        ],
    ];
}

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