You are here

protected function MetatagFieldTermTest::setUpEntityType in Metatag 8

Any additional configuration that's needed for this entity type.

Overrides MetatagFieldTestBase::setUpEntityType

File

tests/src/Functional/MetatagFieldTermTest.php, line 85

Class

MetatagFieldTermTest
Ensures that the Metatag field works correctly on taxonomy terms.

Namespace

Drupal\Tests\metatag\Functional

Code

protected function setUpEntityType() {
  $new_perms = [
    // From Taxonomy.
    'administer taxonomy',
  ];
  $all_perms = array_merge($this->basePerms, $new_perms);
  $this->adminUser = $this
    ->drupalCreateUser($all_perms);
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('admin/structure/taxonomy/add');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $edit = [
    'name' => 'Tags',
    'vid' => 'tags',
  ];
  $this
    ->drupalPostForm(NULL, $edit, $this
    ->t('Save'));
  $this
    ->drupalLogout();
}