function BeanSetup::addAdminUser in Bean (for Drupal 7) 7
Create an admin user.
1 call to BeanSetup::addAdminUser()
- BeanSetup::setUp in tests/
BeanSetup.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
BeanSetup.test, line 52 - Tests for block.module.
Class
- BeanSetup
- A base class for other classes to extend.
Code
function addAdminUser() {
$permissions = array_keys(bean_permission());
$permissions += array(
'administer blocks',
'access administration pages',
'access content',
);
$this->admin_user = $this
->drupalCreateUser($permissions);
$this
->drupalLogin($this->admin_user);
// Test plugin name.
$this->plugin_name = 'test_bean';
}