You are here

public function EntityBrowserTest::testViewsSelectionDisplayWidget in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 tests/src/FunctionalJavascript/EntityBrowserTest.php \Drupal\Tests\entity_browser\FunctionalJavascript\EntityBrowserTest::testViewsSelectionDisplayWidget()

Tests views selection display.

File

tests/src/FunctionalJavascript/EntityBrowserTest.php, line 281

Class

EntityBrowserTest
Tests the entity_browser.

Namespace

Drupal\Tests\entity_browser\FunctionalJavascript

Code

public function testViewsSelectionDisplayWidget() {

  // Sets the dropdown widget selector.

  /** @var \Drupal\entity_browser\EntityBrowserInterface $browser */
  $browser = $this->container
    ->get('entity_type.manager')
    ->getStorage('entity_browser')
    ->load('test_entity_browser_file')
    ->setSelectionDisplay('view');
  $browser
    ->save();
  $this
    ->assertEquals($browser
    ->getSelectionDisplay()
    ->getPluginId(), 'view', 'Selection display is set to view.');
}