protected function PanelizerIpeTest::createAdminUser in Panelizer 8.3
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 src/
Tests/ PanelizerIpeTest.php - Do the necessary setup work for the individual permissions tests.
- PanelizerIpeTest::testAdministerPanelizer in src/
Tests/ PanelizerIpeTest.php - Confirm the 'administer panelizer' permission works.
File
- src/
Tests/ PanelizerIpeTest.php, line 46
Class
- PanelizerIpeTest
- Confirm that the IPE functionality works.
Namespace
Drupal\panelizer\TestsCode
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);
}