Chris@0: drupalLogin($this->drupalCreateUser([ Chris@0: 'administer taxonomy', Chris@0: 'administer content translation', Chris@0: ])); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Tests language settings for vocabularies. Chris@0: */ Chris@0: public function testVocabularyLanguage() { Chris@0: $this->drupalGet('admin/structure/taxonomy/add'); Chris@0: Chris@0: // Check that the field to enable content translation is available. Chris@0: $this->assertField('edit-default-language-content-translation', 'The content translation checkbox is present on the page.'); Chris@0: Chris@0: // Create the vocabulary. Chris@17: $vid = mb_strtolower($this->randomMachineName()); Chris@0: $edit['name'] = $this->randomMachineName(); Chris@0: $edit['description'] = $this->randomMachineName(); Chris@0: $edit['langcode'] = 'en'; Chris@0: $edit['vid'] = $vid; Chris@0: $edit['default_language[content_translation]'] = TRUE; Chris@0: $this->drupalPostForm(NULL, $edit, t('Save')); Chris@0: Chris@0: // Check if content translation is enabled on the edit page. Chris@0: $this->drupalGet('admin/structure/taxonomy/manage/' . $vid); Chris@0: $this->assertFieldChecked('edit-default-language-content-translation', 'The content translation was correctly selected.'); Chris@0: } Chris@0: Chris@0: }