class LocaleTranslateStringTourTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php \Drupal\Tests\locale\Functional\LocaleTranslateStringTourTest
- 9 core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php \Drupal\Tests\locale\Functional\LocaleTranslateStringTourTest
Tests the Translate Interface tour.
@group locale
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\Tests\tour\Functional\TourTestBase
- class \Drupal\Tests\locale\Functional\LocaleTranslateStringTourTest
- class \Drupal\Tests\tour\Functional\TourTestBase
Expanded class hierarchy of LocaleTranslateStringTourTest
File
- core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslateStringTourTest.php, line 12
Namespace
Drupal\Tests\locale\FunctionalView source
class LocaleTranslateStringTourTest extends TourTestBase {
/**
* An admin user with administrative permissions to translate.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'locale',
'tour',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'translate interface',
'access tour',
'administer languages',
]);
$this
->drupalLogin($this->adminUser);
}
/**
* Tests locale tour tip availability.
*/
public function testTranslateStringTourTips() {
// Add another language so there are no missing form items.
$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();
}
}