You are here

protected function InlineEntityFormTest::sortableUpdate in Entity Browser 8.2

Define to provide any necessary callback following layout change.

Parameters

string $item: The HTML selector for the element to be moved.

string $from: The HTML selector for the previous container element.

null|string $to: The HTML selector for the target container.

Overrides SortableTestTrait::sortableUpdate

File

tests/src/FunctionalJavascript/InlineEntityFormTest.php, line 423

Class

InlineEntityFormTest
Test for integration of entity browser and inline entity form.

Namespace

Drupal\Tests\entity_browser\FunctionalJavascript

Code

protected function sortableUpdate($item, $from, $to = NULL) {
  list($container) = explode(' ', $item, 2);
  $js = <<<END
(Drupal.entityBrowserEntityReference || Drupal.entityBrowserMultiStepDisplay).entitiesReordered(document.querySelector("{<span class="php-variable">$container</span>}"));
END;
  $this
    ->getSession()
    ->executeScript($js);
}