You are here

protected function EckTestHelper::enableEntityTypeTranslation in Entity Construction Kit (ECK) 7.2

Enable Entity Translation for a given entity type.

1 call to EckTestHelper::enableEntityTypeTranslation()
EckEntityTranslationTest::testTranslations in tests/EckEntityTranslationTest.test
Test translating an entity type.

File

tests/EckTestHelper.test, line 296
The EckTestHelper class.

Class

EckTestHelper
Helper logic for the other ECK tests.

Code

protected function enableEntityTypeTranslation($entity_type) {
  $this
    ->drupalGet('admin/config/regional/entity_translation');
  $this
    ->assertResponse(200);
  $edit = array(
    "entity_translation_entity_types[{$entity_type}]" => $entity_type,
  );
  $this
    ->drupalPost(NULL, $edit, t('Save configuration'));
  $this
    ->assertResponse(200);
  $this
    ->assertText(t('The configuration options have been saved.'));
}