public function MenuSchemeUITest::assertAdminCanSelectMenus in Workbench Access 8
Assert admin can select menus.
Parameters
\Drupal\workbench_access\Entity\AccessSchemeInterface $scheme: Access scheme.
1 call to MenuSchemeUITest::assertAdminCanSelectMenus()
- MenuSchemeUITest::testSchemeUi in tests/
src/ Functional/ MenuSchemeUITest.php - Tests scheme UI.
File
- tests/
src/ Functional/ MenuSchemeUITest.php, line 76
Class
- MenuSchemeUITest
- Defines a class for testing the UI to create and configure schemes.
Namespace
Drupal\Tests\workbench_access\FunctionalCode
public function assertAdminCanSelectMenus(AccessSchemeInterface $scheme) {
$this
->drupalGet($scheme
->toUrl('edit-form'));
$this
->submitForm([
'scheme_settings[menus][main]' => 1,
], 'Save');
$updated = $this
->loadUnchangedScheme($scheme
->id());
$this
->assertEquals([
'main',
], $updated
->getAccessScheme()
->getConfiguration()['menus']);
}