function I18nFieldPlaceholderTestCase::setUp in Field placeholder 7
Same name and namespace in other branches
- 7.2 i18n_field_placeholder/i18n_field_placeholder.test \I18nFieldPlaceholderTestCase::setUp()
Prepares the testing environment.
Overrides DrupalWebTestCase::setUp
File
- i18n_field_placeholder/
i18n_field_placeholder.test, line 27 - File that holds multilingual tests for Field placeholder module.
Class
- I18nFieldPlaceholderTestCase
- @file File that holds multilingual tests for Field placeholder module.
Code
function setUp() {
parent::setUp('i18n_field', 'i18n_field_placeholder');
parent::setUpLanguages();
$this->translator = $this
->drupalCreateUser(array(
'translate interface',
'translate user-defined strings',
));
// Create content type, with underscores.
$type_name = strtolower($this
->randomName(8)) . '_test';
$type = $this
->drupalCreateContentType(array(
'name' => $type_name,
'type' => $type_name,
));
$this->type = $type->type;
// Store a valid URL name, with hyphens instead of underscores.
$this->hyphen_type = str_replace('_', '-', $this->type);
}