protected function EntityQueryRelationshipTest::assertResults in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php \Drupal\KernelTests\Core\Entity\EntityQueryRelationshipTest::assertResults()
- 9 core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php \Drupal\KernelTests\Core\Entity\EntityQueryRelationshipTest::assertResults()
Assert the results.
@internal
Parameters
array $expected: A list of indexes in the $this->entities array.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityQueryRelationshipTest.php, line 230
Class
- EntityQueryRelationshipTest
- Tests the Entity Query relationship API.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function assertResults(array $expected) : void {
$expected_count = count($expected);
$this
->assertCount($expected_count, $this->queryResults);
foreach ($expected as $key) {
$id = $this->entities[$key]
->id();
$this
->assertEquals($id, $this->queryResults[$id]);
}
}