public function UserSessionTest::providerTestHasPermission in Drupal 9
Same name and namespace in other branches
- 8 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;
}