protected function VocabularyLanguageTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php \Drupal\Tests\taxonomy\Functional\VocabularyLanguageTest::setUp()
Overrides TaxonomyTestBase::setUp
File
- core/
modules/ taxonomy/ tests/ src/ Functional/ VocabularyLanguageTest.php, line 22
Class
- VocabularyLanguageTest
- Tests the language functionality for vocabularies.
Namespace
Drupal\Tests\taxonomy\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Create an administrative user.
$this
->drupalLogin($this
->drupalCreateUser([
'administer taxonomy',
]));
// Add some custom languages.
ConfigurableLanguage::create([
'id' => 'aa',
'label' => $this
->randomMachineName(),
])
->save();
ConfigurableLanguage::create([
'id' => 'bb',
'label' => $this
->randomMachineName(),
])
->save();
}