You are here

public function AliasStorageTest::testLoad in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/KernelTests/Core/Path/AliasStorageTest.php \Drupal\KernelTests\Core\Path\AliasStorageTest::testLoad()

@covers ::load

File

core/tests/Drupal/KernelTests/Core/Path/AliasStorageTest.php, line 40
Contains \Drupal\KernelTests\Core\Path\AliasStorageTest.

Class

AliasStorageTest
@coversDefaultClass \Drupal\Core\Path\AliasStorage @group path

Namespace

Drupal\KernelTests\Core\Path

Code

public function testLoad() {
  $this->storage
    ->save('/test-source-Case', '/test-alias-Case');
  $expected = [
    'pid' => 1,
    'alias' => '/test-alias-Case',
    'source' => '/test-source-Case',
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ];
  $this
    ->assertEquals($expected, $this->storage
    ->load([
    'alias' => '/test-alias-Case',
  ]));
  $this
    ->assertEquals($expected, $this->storage
    ->load([
    'alias' => '/test-alias-case',
  ]));
  $this
    ->assertEquals($expected, $this->storage
    ->load([
    'source' => '/test-source-Case',
  ]));
  $this
    ->assertEquals($expected, $this->storage
    ->load([
    'source' => '/test-source-case',
  ]));
}