You are here

protected function TaxonomySchemeUITest::assertAdminCanAddEntityTestAccessControlledBundleToScheme in Workbench Access 8

Assert admin can add entity test bundle that has taxonomy field.

Parameters

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

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

File

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

Class

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

Namespace

Drupal\Tests\workbench_access\Functional

Code

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