You are here

protected function MenuLinkTest::setUp in Multiversion 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/MenuLinkTest.php, line 48

Class

MenuLinkTest
Tests menu links deletion.

Namespace

Drupal\Tests\multiversion\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->workspaceManager = \Drupal::service('workspace.manager');
  $web_user = $this
    ->drupalCreateUser([
    'administer menu',
    'administer workspaces',
  ]);
  $this
    ->drupalLogin($web_user);
  $this
    ->drupalPlaceBlock('system_menu_block:main');
  $this->initialWorkspace = $this->workspaceManager
    ->getActiveWorkspace();
  $this->newWorkspace = Workspace::create([
    'machine_name' => 'foo',
    'label' => 'Foo',
    'type' => 'basic',
  ]);
  $this->newWorkspace
    ->save();
}