public function FppTestHelper::createAdminUser in Fieldable Panels Panes (FPP) 7
Create an admin-level user.
Parameters
array $perms: Any permissions to be added to the user.
Return value
object A standard Drupal user object.
13 calls to FppTestHelper::createAdminUser()
- FppEntityFormTest::testAllowReusableAccessOption in tests/
fpp.entity_form.test - Confirm that the edit form has the correct fields for non-reusable FPPs.
- FppEntityFormTest::testExistingNonReusable in tests/
fpp.entity_form.test - Confirm that the edit form has the correct fields for non-reusable FPPs.
- FppEntityFormTest::testExistingReusable in tests/
fpp.entity_form.test - Confirm that the edit form has the correct fields for reusable FPPs.
- FppEntityFormTest::testNewEntity in tests/
fpp.entity_form.test - Confirm that the basic form fields show on the 'add' form.
- FppFileAccessTest::testFileAccessWithCorrectAuth in tests/
fpp.file_access.test - Confirm private file access works when the visitor DOES have access.
File
- tests/
fpp.helper.test, line 41 - A base class for the Fieldable Panels Panes tests, provides shared methods.
Class
- FppTestHelper
- A base class for the Fieldable Panels Panes tests, provides shared methods.
Code
public function createAdminUser(array $perms = array()) {
// Create a user with the admin permission.
$permissions = array(
// The master permission for FPP.
'administer fieldable panels panes',
// Required for Drupal core 7.50+, otherwise the user won't have access to
// the field settings.
'administer fields',
);
return $this
->createUser(array_merge($permissions, $perms));
}