You are here

public function UserSessionTest::providerTestHasPermission in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Session/UserSessionTest.php \Drupal\Tests\Core\Session\UserSessionTest::providerTestHasPermission()

Provides test data for getHasPermission().

Return value

array

File

core/tests/Drupal/Tests/Core/Session/UserSessionTest.php, line 33
Contains \Drupal\Tests\Core\Session\UserSessionTest.

Class

UserSessionTest
@coversDefaultClass \Drupal\Core\Session\UserSession @group Session

Namespace

Drupal\Tests\Core\Session

Code

public function providerTestHasPermission() {
  $data = array();
  $data[] = array(
    'example permission',
    array(
      'user_one',
      'user_two',
    ),
    array(
      'user_last',
    ),
  );
  $data[] = array(
    'another example permission',
    array(
      'user_two',
    ),
    array(
      'user_one',
      'user_last',
    ),
  );
  $data[] = array(
    'final example permission',
    array(),
    array(
      'user_one',
      'user_two',
      'user_last',
    ),
  );
  return $data;
}