function i18nAccessTestCase::testAdminUser in Translation Access 6
Same name and namespace in other branches
- 7 i18n_access.test \i18nAccessTestCase::testAdminUser()
Test admin user. User with 'administer nodes' permission should be able to create and edit nodes regardless of the language
File
- ./
i18n_access.test, line 193 - Test suite for i18n_access.module
Class
- i18nAccessTestCase
- @file Test suite for i18n_access.module
Code
function testAdminUser() {
$this
->drupalLogin($this->admin_user);
$this
->drupalGet('node/add/story');
$this
->assertField('language', t('Found language selector.'));
$perms = i18n_access_load_permissions($this->admin_user->uid);
$languages = language_list();
$languages[I18N_ACCESS_LANGUAGE_NEUTRAL] = (object) array(
'language' => '',
'name' => 'Language Neutral',
);
foreach ($languages as $language) {
// TODO: Add in check for language neutral
$this
->assertLanguageOption($language->language, t('Option found for %language, regardless of permission, for administrator.', array(
'%language' => $language->name,
)));
}
}