You are here

protected function ConfigEntityQueryTest::assertResults in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::assertResults()

Asserts the results as expected regardless of order.

Parameters

array $expected: Array of expected entity IDs.

4 calls to ConfigEntityQueryTest::assertResults()
ConfigEntityQueryTest::testCaseSensitivity in core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
Tests case sensitivity.
ConfigEntityQueryTest::testConfigEntityQuery in core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
Tests basic functionality.
ConfigEntityQueryTest::testDotted in core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
Tests dotted path matching.
ConfigEntityQueryTest::testStringIdConditions in core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
Tests ID conditions.

File

core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php, line 730

Class

ConfigEntityQueryTest
Tests Config Entity Query functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

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

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