protected function EckTestHelper::enableContentTypeTranslation in Entity Construction Kit (ECK) 7.2
Enable Entity Translation for a content type.
1 call to EckTestHelper::enableContentTypeTranslation()
- EckEntityTranslationTest::testTranslations in tests/
EckEntityTranslationTest.test - Test translating an entity type.
File
- tests/
EckTestHelper.test, line 358 - The EckTestHelper class.
Class
- EckTestHelper
- Helper logic for the other ECK tests.
Code
protected function enableContentTypeTranslation() {
$this
->drupalGet('admin/structure/types/manage/page');
$this
->assertResponse(200);
$edit = array(
'language_content_type' => ENTITY_TRANSLATION_ENABLED,
);
$this
->drupalPost(NULL, $edit, t('Save content type'));
$this
->assertResponse(200);
$this
->assertText(strip_tags(t('The content type %name has been updated.', array(
'%name' => 'Basic page',
))));
$this
->drupalGet('admin/structure/types/manage/page/fields/body');
$this
->assertResponse(200);
$edit = array(
'field[translatable]' => TRUE,
);
$this
->drupalPost(NULL, $edit, t('Save settings'));
$this
->assertResponse(200);
$this
->assertText(strip_tags(t('Saved %label configuration.', array(
'%label' => 'Body',
))));
}