You are here

function EntityTranslationTestCase::login in Entity Translation 7

Login the given user only if she has not changed.

16 calls to EntityTranslationTestCase::login()
EntityTranslationCommentTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationCommentTestCase::testCommentLanguageFiltering in tests/entity_translation.test
Test comment filtering by language.
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.

... See full list

File

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

Class

EntityTranslationTestCase
Base class for entity translation module tests.

Code

function login($user) {
  if (!isset($this->current_user) || $this->current_user->uid != $user->uid) {
    $this->current_user = $user;
    $this
      ->drupalLogin($user);
  }
}