You are here

public function UrlEmbedDialogTest::getEmbedDialog in URL Embed 8

Retrieves an embed dialog based on given parameters.

Parameters

string $filter_format_id: ID of the filter format.

string $embed_button_id: ID of the embed button.

Return value

string The retrieved HTML string.

2 calls to UrlEmbedDialogTest::getEmbedDialog()
UrlEmbedDialogTest::testUrlEmbedButtonMarkup in tests/src/Functional/UrlEmbedDialogTest.php
Tests the URL embed button markup.
UrlEmbedDialogTest::testUrlEmbedDialog in tests/src/Functional/UrlEmbedDialogTest.php
Tests the URL embed dialog.

File

tests/src/Functional/UrlEmbedDialogTest.php, line 90

Class

UrlEmbedDialogTest
Tests the url_embed dialog controller and route.

Namespace

Drupal\Tests\url_embed\Functional

Code

public function getEmbedDialog($filter_format_id = NULL, $embed_button_id = NULL) {
  $url = 'url-embed/dialog';
  if (!empty($filter_format_id)) {
    $url .= '/' . $filter_format_id;
    if (!empty($embed_button_id)) {
      $url .= '/' . $embed_button_id;
    }
  }
  return $this
    ->drupalGet($url);
}