public function AccessByRoleFormTest::testAccessByRoleFormMenu in Workbench Access 8
Tests that the correct roles are displayed on the access by role form.
File
- tests/
src/ Functional/ AccessByRoleFormTest.php, line 66
Class
- AccessByRoleFormTest
- Tests for the access by role form.
Namespace
Drupal\Tests\workbench_access\FunctionalCode
public function testAccessByRoleFormMenu() {
// Set up test scheme.
$node_type = $this
->createContentType([
'type' => 'page',
]);
$scheme = $this
->setUpMenuScheme([
$node_type
->id(),
], [
'main',
]);
// Create a menu link.
$link = MenuLinkContent::create([
'title' => 'Home',
'link' => [
[
'uri' => 'route:<front>',
],
],
'menu_name' => 'main',
]);
$link
->save();
$section_id = $link
->id();
$this
->doFormTests($scheme, $section_id);
}