public function FieldCollectionEntityTranslationTestCase::getTranslatorUser in Field collection 7
Returns a user with minimal translation rights.
Parameters
$permissions: Additional permissions for administrative user.
1 call to FieldCollectionEntityTranslationTestCase::getTranslatorUser()
- FieldCollectionEntityTranslationTestCase::setUp in ./
field_collection.test - Sets up a Drupal site for running functional and integration tests.
File
- ./
field_collection.test, line 734 - Tests for field_collections.
Class
- FieldCollectionEntityTranslationTestCase
- Test using field collection with content that gets translated with Entity Translation.
Code
public function getTranslatorUser(array $permissions = array()) {
if (!isset($this->translator_user)) {
$this->translator_user = $this
->drupalCreateUser(array_merge(array(
'create page content',
'edit own page content',
'delete own page content',
'translate any entity',
), $permissions));
}
return $this->translator_user;
}