function LocaleTranslatedSchemaDefinitionTest::setUp

Same name in other branches
  1. 9 core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php \Drupal\Tests\locale\Functional\LocaleTranslatedSchemaDefinitionTest::setUp()
  2. 10 core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php \Drupal\Tests\locale\Functional\LocaleTranslatedSchemaDefinitionTest::setUp()
  3. 11.x 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() {
    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 manager, the t() cache, etc. are all cleared.
    drupal_flush_all_caches();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.