protected function PanelizerIpeTest::createAdminUser in Panelizer 8.5
Same name and namespace in other branches
- 8.4 tests/src/Functional/PanelizerIpeTest.php \Drupal\Tests\panelizer\Functional\PanelizerIpeTest::createAdminUser()
Create a user with the required permissions.
Parameters
array $perms: Any additiona permissions that need to be added.
Return value
Drupal\user\Entity\User The user account that was created.
2 calls to PanelizerIpeTest::createAdminUser()
- PanelizerIpeTest::setupPermissionTests in tests/
src/ Functional/ PanelizerIpeTest.php - Do the necessary setup work for the individual permissions tests.
- PanelizerIpeTest::testAdministerPanelizerPermission in tests/
src/ Functional/ PanelizerIpeTest.php - Confirm the 'administer panelizer' permission works.
File
- tests/
src/ Functional/ PanelizerIpeTest.php, line 69
Class
- PanelizerIpeTest
- Confirm that the IPE functionality works.
Namespace
Drupal\Tests\panelizer\FunctionalCode
protected function createAdminUser(array $perms = array()) {
$perms += [
// From system.
'access administration pages',
// Content permissions.
'access content',
'administer content types',
'administer nodes',
'create page content',
'edit any page content',
'edit own page content',
// From Field UI.
'administer node display',
// From Panels.
'access panels in-place editing',
];
$this
->verbose('<pre>' . print_r($perms, TRUE) . '</pre>');
return $this
->drupalCreateUser($perms);
}