protected function MenuSchemeUITest::assertAdminCanAddNodeTypes in Workbench Access 8
Assert admin can add node types.
Parameters
\Drupal\workbench_access\Entity\AccessSchemeInterface $scheme: Access scheme.
1 call to MenuSchemeUITest::assertAdminCanAddNodeTypes()
- MenuSchemeUITest::testSchemeUi in tests/
src/ Functional/ MenuSchemeUITest.php - Tests scheme UI.
File
- tests/
src/ Functional/ MenuSchemeUITest.php, line 91
Class
- MenuSchemeUITest
- Defines a class for testing the UI to create and configure schemes.
Namespace
Drupal\Tests\workbench_access\FunctionalCode
protected function assertAdminCanAddNodeTypes(AccessSchemeInterface $scheme) {
$this
->drupalGet($scheme
->toUrl('edit-form'));
$this
->submitForm([
'scheme_settings[bundles][page]' => 1,
'scheme_settings[bundles][article]' => 1,
], 'Save');
$updated = $this
->loadUnchangedScheme($scheme
->id());
$this
->assertTrue($updated
->getAccessScheme()
->applies('node', 'page'));
$this
->assertTrue($updated
->getAccessScheme()
->applies('node', 'article'));
}