/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->workspaceManager = \Drupal::service('workspace.manager'); $web_user = $this->drupalCreateUser(array('administer menu')); $this->drupalLogin($web_user); $this->drupalPlaceBlock('system_menu_block:main'); $this->new_workspace = Workspace::create(['machine_name' => 'foo', 'label' => 'Foo']); $this->new_workspace->save(); }