ConfigTranslationViewListUiTest.php in Drupal 8
File
core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
View source
<?php
namespace Drupal\Tests\config_translation\Functional;
use Drupal\Tests\views_ui\Functional\UITestBase;
class ConfigTranslationViewListUiTest extends UITestBase {
public static $testViews = [
'node',
'test_view',
];
public static $modules = [
'config_translation',
'views_ui',
];
protected $defaultTheme = 'stark';
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
$permissions = [
'administer views',
'translate configuration',
];
$this
->drupalLogin($this
->drupalCreateUser($permissions));
}
public function testTranslateOperationInViewListUi() {
$this
->drupalGet('admin/structure/views');
$translate_link = 'admin/structure/views/view/test_view/translate';
$this
->assertLinkByHref($translate_link);
$this
->drupalGet($translate_link);
$this
->assertRaw('<th>' . t('Language') . '</th>');
$this
->assertLinkByHref('admin/structure/views/view/test_view');
}
}