function i18nAccessTestCase::setUp in Translation Access 6
Same name and namespace in other branches
- 7 i18n_access.test \i18nAccessTestCase::setUp()
Implementation of setUp().
Overrides DrupalWebTestCase::setUp
File
- ./
i18n_access.test, line 23 - Test suite for i18n_access.module
Class
- i18nAccessTestCase
- @file Test suite for i18n_access.module
Code
function setUp() {
parent::setUp('locale', 'translation', 'i18n_access');
$this->admin_user = $this
->drupalCreateUser(array(
'administer languages',
'administer site configuration',
'access administration pages',
'administer content types',
'administer nodes',
'administer users',
));
$this->translator = $this
->drupalCreateUser(array(
'create story content',
'edit own story content',
'translate content',
));
$this->visitor = $this
->drupalCreateUser(array(
'access content',
));
$this
->drupalLogin($this->admin_user);
$this
->addLanguage('fr');
$this
->addLanguage('de');
$this
->setLanguagePermissions($this->translator, array(
'en',
'fr',
));
// Set Story content type to use multilingual support with translation.
$edit = array();
$edit['language_content_type'] = 2;
$this
->drupalPost('admin/content/node-type/story', $edit, t('Save content type'));
$this
->assertRaw(t('The content type %type has been updated.', array(
'%type' => 'Story',
)), t('Story content type has been updated.'));
}