You are here

protected function EntityQueryRelationshipTest::assertResults in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Entity/EntityQueryRelationshipTest.php \Drupal\system\Tests\Entity\EntityQueryRelationshipTest::assertResults()

Assert the results.

Parameters

array $expected: A list of indexes in the $this->entities array.

1 call to EntityQueryRelationshipTest::assertResults()
EntityQueryRelationshipTest::testQuery in core/modules/system/src/Tests/Entity/EntityQueryRelationshipTest.php
Tests querying.

File

core/modules/system/src/Tests/Entity/EntityQueryRelationshipTest.php, line 167
Contains \Drupal\system\Tests\Entity\EntityQueryRelationshipTest.

Class

EntityQueryRelationshipTest
Tests the Entity Query relationship API.

Namespace

Drupal\system\Tests\Entity

Code

protected function assertResults($expected) {
  $this
    ->assertEqual(count($this->queryResults), count($expected));
  foreach ($expected as $key) {
    $id = $this->entities[$key]
      ->id();
    $this
      ->assertEqual($this->queryResults[$id], $id);
  }
}