You are here

public function OptimizelyAccessTest::testOptimizelyPermission in Optimizely 8

Same name and namespace in other branches
  1. 8.3 src/Tests/OptimizelyAccessTest.php \Drupal\optimizely\Tests\OptimizelyAccessTest::testOptimizelyPermission()
  2. 8.0 src/Tests/OptimizelyAccessTest.php \Drupal\optimizely\Tests\OptimizelyAccessTest::testOptimizelyPermission()

Test that the Optimizely permission itself is valid.

File

src/Tests/OptimizelyAccessTest.php, line 81

Class

OptimizelyAccessTest
Create users with no, some, and optimizely permissions.

Namespace

Drupal\optimizely\Tests

Code

public function testOptimizelyPermission() {
  $valid = $this
    ->checkPermissions([
    'name' => $this->optimizelyPermission,
  ]);
  $this
    ->assertTrue($valid, t("<strong> '@perm' is a valid permission.</strong>", [
    '@perm' => $this->optimizelyPermission,
  ]), 'Optimizely');
}