You are here

protected function UpdaterTest::getUpdateDefinition in Update helper 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/UpdaterTest.php \Drupal\Tests\update_helper\Kernel\UpdaterTest::getUpdateDefinition()

Get update definition that should be executed.

Return value

array Update definition array.

1 call to UpdaterTest::getUpdateDefinition()
UpdaterTest::setUp in tests/src/Kernel/UpdaterTest.php

File

tests/src/Kernel/UpdaterTest.php, line 61

Class

UpdaterTest
@covers \Drupal\update_helper\Updater

Namespace

Drupal\Tests\update_helper\Kernel

Code

protected function getUpdateDefinition() {
  return [
    '__global_actions' => [
      'install_modules' => [
        'help',
      ],
      'import_configs' => [
        'tour.tour.tour-update-helper-test',
      ],
    ],
    'field.storage.node.body' => [
      'expected_config' => [
        'lost_config' => 'text',
        'settings' => [
          'max_length' => 123,
        ],
        'status' => FALSE,
        'type' => 'text',
      ],
      'update_actions' => [
        'add' => [
          'cardinality' => 1,
        ],
        'change' => [
          'settings' => [],
          'status' => TRUE,
          'type' => 'text_with_summary',
        ],
        'delete' => [
          'lost_config' => 'text',
          'settings' => [
            'max_length' => '123',
          ],
        ],
      ],
    ],
  ];
}