getEditorPermissions example


  protected function getEditorPermissions() {
    // Every entity-type-specific test needs to define these.     return [];
  }

  /** * Returns an array of permissions needed for the administrator. */
  protected function getAdministratorPermissions() {
    return array_merge($this->getEditorPermissions()$this->getTranslatorPermissions()['administer languages', 'administer content translation']);
  }

  /** * Creates and activates translator, editor and admin users. */
  protected function setupUsers() {
    $this->translator = $this->drupalCreateUser($this->getTranslatorPermissions(), 'translator');
    $this->editor = $this->drupalCreateUser($this->getEditorPermissions(), 'editor');
    $this->administrator = $this->drupalCreateUser($this->getAdministratorPermissions(), 'administrator');
    $this->drupalLogin($this->translator);
  }

  
Home | Imprint | This part of the site doesn't use cookies.