You are here

protected function BlockFormRoutesAccessTest::getBlockAdminAddUrl in Block permissions 8

Gets the path to block add form.

Parameters

string $id: Block id.

string $theme: Theme name.

Return value

\Drupal\Core\Url A new Url object for a routed URL.

1 call to BlockFormRoutesAccessTest::getBlockAdminAddUrl()
BlockFormRoutesAccessTest::testBlockAddFormAccess in tests/src/Functional/BlockFormRoutesAccessTest.php
Tests access to "/admin/structure/block/add/{plugin_id}/{theme}" page.

File

tests/src/Functional/BlockFormRoutesAccessTest.php, line 207

Class

BlockFormRoutesAccessTest
Tests Block permissions access control handler for block configuration pages.

Namespace

Drupal\Tests\block_permissions\Functional

Code

protected function getBlockAdminAddUrl($id, $theme) {
  return Url::fromRoute('block.admin_add', [
    'plugin_id' => $id,
    'theme' => $theme,
  ]);
}