class ContentTranslationUISkipTest
Same name and namespace in other branches
- 11.x core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationUISkipTest
- 10 core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationUISkipTest
- 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationUISkipTest
Tests the content translation UI check skip.
@group content_translation
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\content_translation\Functional\ContentTranslationUISkipTest implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of ContentTranslationUISkipTest
File
-
core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationUISkipTest.php, line 12
Namespace
Drupal\Tests\content_translation\FunctionalView source
class ContentTranslationUISkipTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'content_translation_test',
'user',
'node',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests the content_translation_ui_skip key functionality.
*/
public function testUICheckSkip() {
$admin_user = $this->drupalCreateUser([
'translate any entity',
'administer content translation',
'administer languages',
]);
$this->drupalLogin($admin_user);
// Visit the content translation.
$this->drupalGet('admin/config/regional/content-language');
// Check the message regarding UI integration.
$this->assertSession()
->pageTextContains('Test entity - Translatable skip UI check');
$this->assertSession()
->pageTextContains('Test entity - Translatable check UI (Translation is not supported)');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.