class EntityTypeWithoutLanguageFormTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php \Drupal\Tests\language\Functional\EntityTypeWithoutLanguageFormTest
- 9 core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php \Drupal\Tests\language\Functional\EntityTypeWithoutLanguageFormTest
Tests entity type without language support.
This is to ensure that an entity type without language support can not enable the language select from the content language settings page.
@group language
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\language\Functional\EntityTypeWithoutLanguageFormTest
Expanded class hierarchy of EntityTypeWithoutLanguageFormTest
File
- core/
modules/ language/ tests/ src/ Functional/ EntityTypeWithoutLanguageFormTest.php, line 15
Namespace
Drupal\Tests\language\FunctionalView source
class EntityTypeWithoutLanguageFormTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'language',
'language_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
// Create and log in administrative user.
$admin_user = $this
->drupalCreateUser([
'administer languages',
]);
$this
->drupalLogin($admin_user);
}
/**
* Tests configuration options with an entity without language definition.
*/
public function testEmptyLangcode() {
// Assert that we can not enable language select from
// content language settings page.
$this
->drupalGet('admin/config/regional/content-language');
$this
->assertSession()
->fieldNotExists('entity_types[no_language_entity_test]');
}
}