function SuperUserAccessPolicyTest::calculatePermissionsProvider

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

Data provider for testCalculatePermissions.

Return value

array A list of test scenarios.

File

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

Class

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

Namespace

Drupal\Tests\Core\Session

Code

public static function calculatePermissionsProvider() : array {
    $cases['is-super-user'] = [
        1,
        TRUE,
    ];
    $cases['is-normal-user'] = [
        2,
        FALSE,
    ];
    return $cases;
}

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