protected function ConfigTranslationListUiTest::doBlockListTest 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::doBlockListTest()
Tests the block listing for the translate operation.
There are no blocks placed in the testing profile. Add one, then check for Translate operation.
1 call to ConfigTranslationListUiTest::doBlockListTest()
- 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 92 - Contains \Drupal\config_translation\Tests\ConfigTranslationListUiTest.
Class
- ConfigTranslationListUiTest
- Visit all lists.
Namespace
Drupal\config_translation\TestsCode
protected function doBlockListTest() {
// Add a test block, any block will do.
// Set the machine name so the translate link can be built later.
$id = Unicode::strtolower($this
->randomMachineName(16));
$this
->drupalPlaceBlock('system_powered_by_block', array(
'id' => $id,
));
// Get the Block listing.
$this
->drupalGet('admin/structure/block');
$translate_link = 'admin/structure/block/manage/' . $id . '/translate';
// Test if the link to translate the block 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>');
}