function EntityQueryRelationshipTest::assertResults
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php \Drupal\KernelTests\Core\Entity\EntityQueryRelationshipTest::assertResults()
- 10 core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php \Drupal\KernelTests\Core\Entity\EntityQueryRelationshipTest::assertResults()
- 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php \Drupal\KernelTests\Core\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/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityQueryRelationshipTest.php - Tests querying.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityQueryRelationshipTest.php, line 213
Class
- EntityQueryRelationshipTest
- Tests the Entity Query relationship API.
Namespace
Drupal\KernelTests\Core\EntityCode
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.