You are here

public function LanguageNeutralAliasesStorageTest::testDelete in Language neutral aliases 8

Test that delete() only deletes language neutral aliases.

File

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

Class

LanguageNeutralAliasesStorageTest
Test language neutral aliases.

Namespace

Drupal\Tests\language_neutral_aliases\Kernel

Code

public function testDelete() {
  $storage = $this->container
    ->get('path.alias_storage');
  $storage
    ->delete([
    $this->field => '/node/1',
  ]);
  $storage
    ->delete([
    $this->field => '/node/3',
  ]);
  $this
    ->assertEqual([
    '/node/1',
    '/node/2',
  ], $this
    ->getAllUnfiltered([
    $this->field,
  ]));
}