protected function SelectionTest::assertResults in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php \Drupal\Tests\field\Kernel\EntityReference\Views\SelectionTest::assertResults()
- 9 core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php \Drupal\Tests\field\Kernel\EntityReference\Views\SelectionTest::assertResults()
Confirm the expected results are returned.
@internal
Parameters
array $result: Query results keyed by node type and nid.
1 call to SelectionTest::assertResults()
- SelectionTest::testSelectionHandler in core/
modules/ field/ tests/ src/ Kernel/ EntityReference/ Views/ SelectionTest.php - Tests the selection handler.
File
- core/
modules/ field/ tests/ src/ Kernel/ EntityReference/ Views/ SelectionTest.php, line 156
Class
- SelectionTest
- Tests entity reference selection handler.
Namespace
Drupal\Tests\field\Kernel\EntityReference\ViewsCode
protected function assertResults(array $result) : void {
foreach ($result as $node_type => $values) {
foreach ($values as $nid => $label) {
$this
->assertSame($node_type, $this->nodes[$nid]
->bundle());
$this
->assertSame(trim(strip_tags($label)), Html::escape($this->nodes[$nid]
->label()));
}
}
}