function SuperUserAccessPolicyTest::testApplies

Same name in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Session/SuperUserAccessPolicyTest.php \Drupal\Tests\Core\Session\SuperUserAccessPolicyTest::testApplies()

@covers ::applies

File

core/tests/Drupal/Tests/Core/Session/SuperUserAccessPolicyTest.php, line 49

Class

SuperUserAccessPolicyTest
@coversDefaultClass \Drupal\Core\Session\SuperUserAccessPolicy @group Session

Namespace

Drupal\Tests\Core\Session

Code

public function testApplies() : void {
    $this->assertTrue($this->accessPolicy
        ->applies(AccessPolicyInterface::SCOPE_DRUPAL));
    $this->assertFalse($this->accessPolicy
        ->applies('another scope'));
    $this->assertFalse($this->accessPolicy
        ->applies($this->randomString()));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.