You are here

public function LanguageNeutralAliasesStorageTest::testPreloadPathAlias in Language neutral aliases 8

Test that preloadPathAlias() only returns language neutral aliases.

File

tests/src/Kernel/LanguageNeutralAliasesStorageTest.php, line 169

Class

LanguageNeutralAliasesStorageTest
Test language neutral aliases.

Namespace

Drupal\Tests\language_neutral_aliases\Kernel

Code

public function testPreloadPathAlias() {
  $storage = $this->container
    ->get('path.alias_storage');
  $this
    ->assertEqual([
    '/node/3' => '/path/third',
  ], $storage
    ->preloadPathAlias([
    '/node/1',
    '/node/3',
  ], LanguageInterface::LANGCODE_NOT_SPECIFIED));
  $this
    ->assertEqual([
    '/node/3' => '/path/third',
  ], $storage
    ->preloadPathAlias([
    '/node/1',
    '/node/3',
  ], 'de'));
}