protected function setUp() { parent::setUp(); $perms = array_keys(\Drupal::service('user.permissions')->getPermissions()); $this->adminUser = $this->drupalCreateUser($perms); $this->drupalLogin($this->adminUser); // This test puts menu links in the Tools menu and then tests for their // presence on the page, so we need to ensure that the Tools block will be // displayed in the admin theme. $this->drupalPlaceBlock('system_menu_block:tools', array('region' => 'content', 'theme' => $this->config('system.theme')->get('admin'))); }
function setUp() { parent::setUp(); $perms = array_keys(\Drupal::moduleHandler()->invokeAll('permission')); $this->admin_user = $this->drupalCreateUser($perms); $this->drupalLogin($this->admin_user); // This test puts menu links in the Tools menu and then tests for their // presence on the page, so we need to ensure that the Tools block will be // displayed in the admin theme. $this->drupalPlaceBlock('system_menu_block:tools', array('machine' => 'system_menu_tools', 'region' => 'content', 'theme' => \Drupal::config('system.theme')->get('admin'))); }