You are here

function TaxonomyMenuUnitTest::setUp in Taxonomy menu 8

Implementation of setUp().

Overrides TaxonomyTestBase::setUp

File

lib/Drupal/taxonomy_menu/Tests/TaxonomyMenuUnitTest.php, line 36
Contains \Drupal\taxonomy_menu\Tests\TaxonomyMenuUnitTest.

Class

TaxonomyMenuUnitTest
Tests for taxonomy vocabulary functions.

Namespace

Drupal\taxonomy_menu\Tests

Code

function setUp() {
  parent::setUp();

  // Create and login an admin user.
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer taxonomy',
    'administer menu',
    'bypass node access',
  ));
  $this
    ->drupalLogin($admin_user);

  // Create a vocabulary and a hierarchy of taxonomy terms for it.
  $this->vocabulary = $this
    ->createVocabulary();
  $this->terms_hierarchy = $this
    ->createTermsHierarchy();
}