protected function ConfigTranslationListUiTest::doVocabularyListTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php \Drupal\config_translation\Tests\ConfigTranslationListUiTest::doVocabularyListTest()
Tests the vocabulary listing for the translate operation.
1 call to ConfigTranslationListUiTest::doVocabularyListTest()
- ConfigTranslationListUiTest::testTranslateOperationInListUi in core/
modules/ config_translation/ src/ Tests/ ConfigTranslationListUiTest.php - Tests if translate link is added to operations in all configuration lists.
File
- core/
modules/ config_translation/ src/ Tests/ ConfigTranslationListUiTest.php, line 160 - Contains \Drupal\config_translation\Tests\ConfigTranslationListUiTest.
Class
- ConfigTranslationListUiTest
- Visit all lists.
Namespace
Drupal\config_translation\TestsCode
protected function doVocabularyListTest() {
// Create a test vocabulary to decouple looking for translate operations
// link so this does not test more than necessary.
$vocabulary = entity_create('taxonomy_vocabulary', array(
'name' => $this
->randomMachineName(),
'description' => $this
->randomMachineName(),
'vid' => Unicode::strtolower($this
->randomMachineName()),
));
$vocabulary
->save();
// Get the Taxonomy listing.
$this
->drupalGet('admin/structure/taxonomy');
$translate_link = 'admin/structure/taxonomy/manage/' . $vocabulary
->id() . '/translate';
// Test if the link to translate the vocabulary is on the page.
$this
->assertLinkByHref($translate_link);
// Test if the link to translate actually goes to the translate page.
$this
->drupalGet($translate_link);
$this
->assertRaw('<th>' . t('Language') . '</th>');
}