You are here

public function IndependentScheduledUpdateTypeTest::testCreateMultiTypes in Scheduled Updates 8

File

tests/src/FunctionalJavascript/IndependentScheduledUpdateTypeTest.php, line 30
Contains \Drupal\Tests\scheduled_updates\IndependentScheduledUpdateTypeTest.

Class

IndependentScheduledUpdateTypeTest
Test adding an Independent Scheduled Update Type.

Namespace

Drupal\Tests\scheduled_updates\FunctionalJavascript

Code

public function testCreateMultiTypes() {
  $label = 'New foo type';
  $id = 'foo';
  $clone_fields = [
    'base_fields[title]' => [
      'input_value' => 'title',
      'label' => t('Title'),
    ],
  ];
  $this
    ->createType($label, $id, $clone_fields);
  $this
    ->checkAddForm($id, $label, $clone_fields, TRUE);
  $label = 'New bar type';
  $id = 'promote_updater';
  $clone_fields = [
    'base_fields[promote]' => [
      'input_value' => 'promote',
      'label' => t('Promoted to front page'),
    ],
  ];
  $this
    ->createType($label, $id, $clone_fields);
  $this
    ->checkAddForm($id, $label, $clone_fields, FALSE);
  $this
    ->checkRunningPromoteUpdates($id);
}