You are here

public function MenuBlockTest::setUp in Menu Block 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/MenuBlockTest.php, line 81

Class

MenuBlockTest
Tests for the menu_block module.

Namespace

Drupal\Tests\menu_block\Functional

Code

public function setUp() {
  parent::setUp();
  $this->menuLinkManager = \Drupal::service('plugin.manager.menu.link');
  $this->blockStorage = \Drupal::service('entity_type.manager')
    ->getStorage('block');
  $this->blockViewBuilder = \Drupal::service('entity_type.manager')
    ->getViewBuilder('block');
  $this->menuLinkContentStorage = \Drupal::service('entity_type.manager')
    ->getStorage('menu_link_content');
  $this->moduleHandler = \Drupal::moduleHandler();
  $this->links = $this
    ->createLinkHierarchy();

  // Create and log in an administrative user.
  $this->adminUser = $this
    ->drupalCreateUser([
    'administer blocks',
    'access administration pages',
  ]);
  $this
    ->drupalLogin($this->adminUser);
}