function ConfigEntityQueryTest::assertResults
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::assertResults()
- 8.9.x core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::assertResults()
- 10 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::assertResults()
Asserts the results as expected regardless of order.
@internal
Parameters
array $expected: Array of expected entity IDs.
5 calls to ConfigEntityQueryTest::assertResults()
- ConfigEntityQueryTest::testAlterHook in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ ConfigEntityQueryTest.php - Test the entity query alter hooks are invoked.
- 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 786
Class
- ConfigEntityQueryTest
- Tests Config Entity Query functionality.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function assertResults(array $expected) : void {
$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]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.