public function ConfigTranslationListUiTest::doResponsiveImageListTest in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php \Drupal\config_translation\Tests\ConfigTranslationListUiTest::doResponsiveImageListTest()
Tests the responsive image mapping listing for the translate operation.
1 call to ConfigTranslationListUiTest::doResponsiveImageListTest()
- 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 362 - Contains \Drupal\config_translation\Tests\ConfigTranslationListUiTest.
Class
- ConfigTranslationListUiTest
- Visit all lists.
Namespace
Drupal\config_translation\TestsCode
public function doResponsiveImageListTest() {
$edit = array();
$edit['label'] = $this
->randomMachineName();
$edit['id'] = strtolower($edit['label']);
$edit['fallback_image_style'] = 'thumbnail';
$this
->drupalPostForm('admin/config/media/responsive-image-style/add', $edit, t('Save'));
$this
->assertRaw(t('Responsive image style %label saved.', array(
'%label' => $edit['label'],
)));
// Get the responsive image style listing.
$this
->drupalGet('admin/config/media/responsive-image-style');
$translate_link = 'admin/config/media/responsive-image-style/' . $edit['id'] . '/translate';
// Test if the link to translate the style 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>');
}