function UserRolesAccessPolicyTest::testApplies

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

@covers ::applies

File

core/tests/Drupal/Tests/Core/Session/UserRolesAccessPolicyTest.php, line 61

Class

UserRolesAccessPolicyTest
@coversDefaultClass \Drupal\Core\Session\UserRolesAccessPolicy @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.