HelpTopicTranslationTest.php in Drupal 10
File
core/modules/help_topics/tests/src/Functional/HelpTopicTranslationTest.php
View source
<?php
namespace Drupal\Tests\help_topics\Functional;
class HelpTopicTranslationTest extends HelpTopicTranslatedTestBase {
protected $defaultTheme = 'stark';
protected function setUp() : void {
parent::setUp();
$this
->drupalLogin($this
->createUser([
'access administration pages',
'view the administration theme',
'administer permissions',
]));
}
public function testHelpTopicTranslations() {
$session = $this
->assertSession();
$this
->drupalGet('admin/help');
$session
->linkExists('ABC-Hilfetestmodul');
$session
->responseHeaderContains('X-Drupal-Cache-Contexts', 'languages:language_interface');
$this
->drupalGet('admin/help/topic/help_topics_test.test');
$session
->pageTextContains('ABC-Hilfetestmodul');
$session
->pageTextContains('Übersetzung testen.');
$session
->responseHeaderContains('X-Drupal-Cache-Contexts', 'languages:language_interface');
}
}