You are here

private function TaxonomyAccessTest::getPermissions in Workbench Access 8

Gets permissions appropriate to a Drupal version.

2 calls to TaxonomyAccessTest::getPermissions()
TaxonomyAccessTest::testCreateAccess in tests/src/Kernel/TaxonomyAccessTest.php
Test create access integration.
TaxonomyAccessTest::testEditAccess in tests/src/Kernel/TaxonomyAccessTest.php
Test edit access integration.

File

tests/src/Kernel/TaxonomyAccessTest.php, line 221

Class

TaxonomyAccessTest
Tests workbench_access integration with taxonomy.

Namespace

Drupal\Tests\workbench_access\Kernel

Code

private function getPermissions() {
  if (substr_count(Drupal::VERSION, '8.4') > 0) {
    $permissions = [
      'administer taxonomy',
      'edit terms in tags',
      'delete terms in tags',
      'edit terms in categories',
      'delete terms in categories',
    ];
  }
  else {
    $permissions = [
      'create terms in tags',
      'edit terms in tags',
      'delete terms in tags',
      'create terms in categories',
      'edit terms in categories',
      'delete terms in categories',
    ];
  }
  return $permissions;
}