You are here

public function FieldCollectionEntityTranslationTestCase::getAdminUser in Field collection 7

Returns a user with administration rights.

Parameters

$permissions: Additional permissions for administrative user.

1 call to FieldCollectionEntityTranslationTestCase::getAdminUser()
FieldCollectionEntityTranslationTestCase::setUp in ./field_collection.test
Sets up a Drupal site for running functional and integration tests.

File

./field_collection.test, line 712
Tests for field_collections.

Class

FieldCollectionEntityTranslationTestCase
Test using field collection with content that gets translated with Entity Translation.

Code

public function getAdminUser(array $permissions = array()) {
  if (!isset($this->admin_user)) {
    $this->admin_user = $this
      ->drupalCreateUser(array_merge(array(
      'bypass node access',
      'administer nodes',
      'administer languages',
      'administer content types',
      'administer blocks',
      'access administration pages',
      'administer site configuration',
      'administer entity translation',
    ), $permissions));
  }
  return $this->admin_user;
}