protected function ConfigEntityQueryTest::assertResults

Asserts the results as expected regardless of order.

Parameters

array $expected: Array of expected entity IDs.

2 calls to ConfigEntityQueryTest::assertResults()
ConfigEntityQueryTest::testConfigEntityQuery in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php
Tests basic functionality.
ConfigEntityQueryTest::testDotted in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php
Tests dotted path matching.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityQueryTest.php, line 464
Contains \Drupal\system\Tests\ConfigEntityQueryTest.

Class

ConfigEntityQueryTest
Tests the config entity query.

Namespace

Drupal\system\Tests\Entity

Code

protected function assertResults($expected) {
  $this
    ->assertIdentical(count($this->queryResults), count($expected));
  foreach ($expected as $value) {

    // This also tests whether $this->queryResults[$value] is even set at all.
    $this
      ->assertIdentical($this->queryResults[$value], $value);
  }
}