protected function MetatagNodeTranslationTest::setUp in Metatag 8
Setup basic environment.
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ MetatagNodeTranslationTest.php, line 59
Class
- MetatagNodeTranslationTest
- Ensures that meta tag values are translated correctly on nodes.
Namespace
Drupal\Tests\metatag\FunctionalCode
protected function setUp() {
parent::setUp();
$admin_permissions = [
'administer content types',
'administer content translation',
'administer languages',
'administer nodes',
'administer node fields',
'bypass node access',
'create content translations',
'delete content translations',
'translate any entity',
'update content translations',
];
// Create and login user.
$this->adminUser = $this
->drupalCreateUser($admin_permissions);
// Add languages.
foreach ($this->additionalLangcodes as $langcode) {
ConfigurableLanguage::createFromLangcode($langcode)
->save();
}
}