You are here

private function EntityBrowserContext::getEntityBrowserSettings in Lightning Media 8.2

Same name and namespace in other branches
  1. 8.3 tests/contexts/EntityBrowserContext.behat.inc \Acquia\LightningExtension\Context\EntityBrowserContext::getEntityBrowserSettings()

Returns settings for a single entity browser.

Parameters

string $id: The entity browser ID (not UUID).

Return value

array The settings for the entity browser.

Throws

\Exception If there is not exactly one entity browser with the given ID.

2 calls to EntityBrowserContext::getEntityBrowserSettings()
EntityBrowserContext::openJS in tests/contexts/EntityBrowserContext.behat.inc
Opens an entity browser using JavaScript.
EntityBrowserContext::openNoJS in tests/contexts/EntityBrowserContext.behat.inc
Opens an entity browser without using JavaScript.

File

tests/contexts/EntityBrowserContext.behat.inc, line 215

Class

EntityBrowserContext
Contains step definitions for interacting with entity browser instances.

Namespace

Acquia\LightningExtension\Context

Code

private function getEntityBrowserSettings($id) {
  $filter = function (array $settings) use ($id) {
    return $settings['entity_browser_id'] === $id;
  };
  $settings = array_filter($this
    ->getAllEntityBrowserSettings(), $filter);
  Assert::count($settings, 1);
  return reset($settings);
}