You are here

public function SelectionTest::testSelectionHandler in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Tests/EntityReference/Views/SelectionTest.php \Drupal\field\Tests\EntityReference\Views\SelectionTest::testSelectionHandler()

Tests the selection handler.

File

core/modules/field/src/Tests/EntityReference/Views/SelectionTest.php, line 104
Contains \Drupal\field\Tests\EntityReference\Views\SelectionTest.

Class

SelectionTest
Tests entity reference selection handler.

Namespace

Drupal\field\Tests\EntityReference\Views

Code

public function testSelectionHandler() {

  // Get values from selection handler.
  $handler = $this->container
    ->get('plugin.manager.entity_reference_selection')
    ->getSelectionHandler($this->field);
  $result = $handler
    ->getReferenceableEntities();
  $this
    ->assertResults($result);
}