You are here

protected function TaxonomySchemeUITest::assertAdminCanAddPageNodeTypeToScheme in Workbench Access 8

Assert admin can add node type that has taxonomy field.

Parameters

\Drupal\workbench_access\Entity\AccessSchemeInterface $scheme: Access scheme.

1 call to TaxonomySchemeUITest::assertAdminCanAddPageNodeTypeToScheme()
TaxonomySchemeUITest::testSchemeUi in tests/src/Functional/TaxonomySchemeUITest.php
Tests scheme UI.

File

tests/src/Functional/TaxonomySchemeUITest.php, line 110

Class

TaxonomySchemeUITest
Defines a class for testing the UI to create and configure schemes.

Namespace

Drupal\Tests\workbench_access\Functional

Code

protected function assertAdminCanAddPageNodeTypeToScheme(AccessSchemeInterface $scheme) {
  $this
    ->drupalGet($scheme
    ->toUrl('edit-form'));
  $this
    ->submitForm([
    'scheme_settings[fields][node:page:field_workbench_access]' => 1,
  ], 'Save');
  $updated = $this
    ->loadUnchangedScheme($scheme
    ->id());
  $this
    ->assertTrue($updated
    ->getAccessScheme()
    ->applies('node', 'page'));
}