You are here

function EntityTranslationTestCase::getTranslatorUser in Entity Translation 7

Returns a user with minimal translation rights.

Parameters

$permissions: Additional permissions for administrative user.

13 calls to EntityTranslationTestCase::getTranslatorUser()
EntityTranslationCommentTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationContentTranslationTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationHookTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationIntegrationTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationIntegrationTestCase::testPathautoIntegration in tests/entity_translation.test
Tests Pathauto integration.

... See full list

File

tests/entity_translation.test, line 87
Tests for Entity translation module.

Class

EntityTranslationTestCase
Base class for entity translation module tests.

Code

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;
}