You are here

protected function ActiveDomainDefaultArgumentTest::assertNids in Domain Access 8

Ensures that a list of nodes appear on the page.

Parameters

string $domain_id: Domain ID.

array $expected_nids: An array of node IDs.

1 call to ActiveDomainDefaultArgumentTest::assertNids()
ActiveDomainDefaultArgumentTest::testActiveDomainDefaultArgument in domain/tests/src/Functional/Views/ActiveDomainDefaultArgumentTest.php
Tests active_domain default argument.

File

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

Class

ActiveDomainDefaultArgumentTest
Tests the active_domain default argument.

Namespace

Drupal\Tests\domain\Functional\Views

Code

protected function assertNids($domain_id, array $expected_nids = []) {
  $result = $this
    ->xpath("//td[contains(@class, 'views-field-nid')]");
  $actual_nids = [];
  foreach ($result as $element) {
    $actual_nids[] = $element
      ->getText();
  }
  $this
    ->assertSame($expected_nids, $actual_nids, 'Domain ID: ' . $domain_id);
}