You are here

public function EmbedButtonEditorAccessCheckTest::getRoute in Embed 8

Performs a request to the embed_test.test_access route.

Parameters

string $editor_id: ID of the editor.

string $embed_button_id: ID of the embed button.

string $value: The query string value to include.

Return value

string The retrieved HTML string.

1 call to EmbedButtonEditorAccessCheckTest::getRoute()
EmbedButtonEditorAccessCheckTest::testEmbedButtonEditorAccessCheck in tests/src/Functional/EmbedButtonEditorAccessCheckTest.php
Tests \Drupal\embed\Access\EmbedButtonEditorAccessCheck.

File

tests/src/Functional/EmbedButtonEditorAccessCheckTest.php, line 106

Class

EmbedButtonEditorAccessCheckTest
Tests EmbedButtonEditorAccessCheck.

Namespace

Drupal\Tests\embed\Functional

Code

public function getRoute($editor_id, $embed_button_id, $value = NULL) {
  $url = 'embed-test/access/' . $editor_id . '/' . $embed_button_id;
  if (!isset($value)) {
    $value = static::SUCCESS;
  }
  return $this
    ->drupalGet($url, [
    'query' => [
      'value' => $value,
    ],
  ]);
}