You are here

public function DomainAliasSortTest::testAliasSort in Domain Access 8

Tests the sorting of alias records.

File

domain_alias/tests/src/Functional/DomainAliasSortTest.php, line 15

Class

DomainAliasSortTest
Tests domain alias request sorting.

Namespace

Drupal\Tests\domain_alias\Functional

Code

public function testAliasSort() {
  $list = $this
    ->sortList();
  $storage = \Drupal::entityTypeManager()
    ->getStorage('domain_alias');
  foreach ($list as $key => $values) {
    $patterns = $storage
      ->getPatterns($key);
    $this
      ->assertEmpty(array_diff($values, $patterns), 'Pattern matched as expected for ' . $key);
  }
}