LocaleTranslateStringTourTest.php in Drupal 10
File
core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
View source
<?php
namespace Drupal\Tests\locale\Functional;
use Drupal\Tests\tour\Functional\TourTestBase;
class LocaleTranslateStringTourTest extends TourTestBase {
protected $adminUser;
protected static $modules = [
'locale',
'tour',
];
protected $defaultTheme = 'stark';
protected function setUp() : void {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'translate interface',
'access tour',
'administer languages',
]);
$this
->drupalLogin($this->adminUser);
}
public function testTranslateStringTourTips() {
$edit = [];
$edit['predefined_langcode'] = 'es';
$this
->drupalGet('admin/config/regional/language/add');
$this
->submitForm($edit, 'Add language');
$this
->drupalGet('admin/config/regional/translate');
$this
->assertTourTips();
}
}