public function EntityTranslationContentTranslationTestCase::configureContentType in Entity Translation 7
Configure the "Basic page" content type for entity translation tests.
Overrides EntityTranslationTestCase::configureContentType
1 call to EntityTranslationContentTranslationTestCase::configureContentType()
- EntityTranslationContentTranslationTestCase::setUp in tests/
entity_translation.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
entity_translation.test, line 702 - Tests for Entity translation module.
Class
- EntityTranslationContentTranslationTestCase
- Basic tests for nodes using both content and entity translation.
Code
public function configureContentType() {
// Configure the "Basic page" content type to use multilingual support with
// content translation.
$edit = array();
$edit['language_content_type'] = TRANSLATION_ENABLED;
$this
->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type'));
$this
->assertRaw(t('The content type %type has been updated.', array(
'%type' => 'Basic page',
)), t('Basic page content type has been updated.'));
// Toggle body field's translatability.
$edit = array();
$edit['field[translatable]'] = 1;
$this
->drupalPost('admin/structure/types/manage/page/fields/body', $edit, t('Save settings'));
$this
->assertRaw(t('Saved %field configuration.', array(
'%field' => 'Body',
)), t('Body field settings have been updated.'));
}