You are here

protected function LocaleTranslatedSchemaDefinitionTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php \Drupal\Tests\locale\Functional\LocaleTranslatedSchemaDefinitionTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php, line 33

Class

LocaleTranslatedSchemaDefinitionTest
Adds and configures languages to check field schema definition.

Namespace

Drupal\Tests\locale\Functional

Code

protected function setUp() : void {
  parent::setUp();
  ConfigurableLanguage::createFromLangcode('fr')
    ->save();
  $this
    ->config('system.site')
    ->set('default_langcode', 'fr')
    ->save();

  // Clear all caches so that the base field definition, its cache in the
  // entity field manager, the t() cache, etc. are all cleared.
  $this
    ->resetAll();
}