You are here

protected function TaxonomySchemeUITest::assertAdminCannotAddEntityTestAccessAccessControlledBundleToScheme in Workbench Access 8

Assert admin cannot add entity test bundle that has no taxonomy field.

Parameters

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

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

File

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

Class

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

Namespace

Drupal\Tests\workbench_access\Functional

Code

protected function assertAdminCannotAddEntityTestAccessAccessControlledBundleToScheme(AccessSchemeInterface $scheme) {
  $this
    ->drupalGet($scheme
    ->toUrl('edit-form'));
  $this
    ->assertSession()
    ->fieldNotExists('scheme_settings[fields][entity_test:not_access_controlled:field_workbench_access]');
  $this
    ->assertFalse($scheme
    ->getAccessScheme()
    ->applies('entity_test', 'not_access_controlled'));
}