function UserSessionTest::providerTestHasPermission
Same name in other branches
- 8.9.x 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 29
Class
- UserSessionTest
- @coversDefaultClass \Drupal\Core\Session\UserSession @group Session
Namespace
Drupal\Tests\Core\SessionCode
public function providerTestHasPermission() {
$data = [];
$data[] = [
'example permission',
[
'user_one',
'user_two',
],
[
'user_last',
],
];
$data[] = [
'another example permission',
[
'user_two',
],
[
'user_one',
'user_last',
],
];
$data[] = [
'final example permission',
[],
[
'user_one',
'user_two',
'user_last',
],
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.