You are here

protected function TitleTranslationTestCase::termLoad in Title 7

Loads a term using the given language as active language.

Parameters

int $tid: The term identifier.

string|null $langcode: (optional) The active language to be set. Defaults to none.

Return value

object|bool A term object.

2 calls to TitleTranslationTestCase::termLoad()
TitleTranslationTestCase::testFormTranslationWorkflow in tests/TitleTranslationTestCase.test
Tests taxonomy form translation workflow.
TitleTranslationTestCase::testProgrammaticTranslationWorkflow in tests/TitleTranslationTestCase.test
Tests taxonomy programmatic translation workflow.

File

tests/TitleTranslationTestCase.test, line 248

Class

TitleTranslationTestCase
Tests for legacy field replacement.

Code

protected function termLoad($tid, $langcode = NULL) {
  drupal_static_reset();
  title_active_language($langcode);
  return current(entity_load('taxonomy_term', array(
    $tid,
  ), array(), TRUE));
}