You are here

public function ActiveDomainDefaultArgumentTest::testActiveDomainDefaultArgument in Domain Access 8

Tests active_domain default argument.

File

domain/tests/src/Functional/Views/ActiveDomainDefaultArgumentTest.php, line 66

Class

ActiveDomainDefaultArgumentTest
Tests the active_domain default argument.

Namespace

Drupal\Tests\domain\Functional\Views

Code

public function testActiveDomainDefaultArgument() {
  $url = Url::fromRoute('view.test_active_domain_argument.page_1');
  foreach ($this
    ->getDomains() as $domain_id => $domain) {
    $page_url = $domain
      ->buildUrl($url
      ->toString());
    $this
      ->drupalGet($page_url);
    $expected_nids = array_values($this->data[$domain_id]);
    $this
      ->assertNids($domain_id, $expected_nids);
  }
}