You are here

public function TaxonomySchemeUITest::assertAdminCanSelectVocabularies in Workbench Access 8

Assert admin can select vocabularies.

Parameters

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

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

File

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

Class

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

Namespace

Drupal\Tests\workbench_access\Functional

Code

public function assertAdminCanSelectVocabularies(AccessSchemeInterface $scheme) {
  $this
    ->drupalGet($scheme
    ->toUrl('edit-form'));
  $this
    ->submitForm([
    'scheme_settings[vocabularies][workbench_access]' => 1,
  ], 'Save');
  $updated = $this
    ->loadUnchangedScheme($scheme
    ->id());
  $this
    ->assertEquals([
    'workbench_access',
  ], $updated
    ->getAccessScheme()
    ->getConfiguration()['vocabularies']);
}