/**
  * Returns an array of node type permissions.
  *
  * @return array
  *   The node type permissions.
  *   @see \Drupal\user\PermissionHandlerInterface::getPermissions()
  */
 public function scheduledUpdateTypesPermissions()
 {
     $perms = array();
     // Generate scheduled_update permissions for all scheduled updates types.
     foreach (ScheduledUpdateType::loadMultiple() as $type) {
         $perms += $this->buildPermissions($type);
     }
     return $perms;
 }
 protected function checkAddForm($type_id, $label, $fields, $only_type)
 {
     $logged_id_user = $this->loggedInUser;
     $add_user = $this->createUser(["create {$type_id} scheduled updates"]);
     $this->drupalLogin($add_user);
     $this->drupalGet('admin/content/scheduled-update/add');
     if ($only_type) {
         // Form shown if only type.
         $this->checkFieldLabels($fields);
     } else {
         $this->assertText($label);
         /** @var ScheduledUpdateType[] $types */
         $types = ScheduledUpdateType::loadMultiple();
         // Check that all types are shown on the add page.
         foreach ($types as $type) {
             $this->assertText($type->label());
         }
     }
     //$this->assertText($label);
     $this->drupalGet("admin/content/scheduled-update/add/{$type_id}");
     $this->assertText(new FormattableMarkup('Create @label Scheduled Update', ['@label' => $label]));
     $this->checkFieldLabels($fields);
     $this->drupalLogin($logged_id_user);
 }