You are here

public static function ConfigHandlerTest::getUpdateDefinition in Update helper 2.x

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

Returns update definition data.

Return value

string Update definition Yaml string.

2 calls to ConfigHandlerTest::getUpdateDefinition()
ConfigHandlerTest::testGeneratePatchFileFromActiveConfig in tests/src/Kernel/ConfigHandlerTest.php
@covers \Drupal\update_helper\ConfigHandler::generatePatchFile
DrushTest::testGeneratePatchFileFromActiveConfigUsingDrush in tests/src/Functional/DrushTest.php
Tests `drush generate configuration-update`.

File

tests/src/Kernel/ConfigHandlerTest.php, line 50

Class

ConfigHandlerTest
Automated tests for ConfigName class.

Namespace

Drupal\Tests\update_helper\Kernel

Code

public static function getUpdateDefinition() {
  return <<<EOF
field.storage.node.body:
  expected_config:
    lost_config: text
    settings:
      max_length: 123
    status: false
    type: text
  update_actions:
    delete:
      lost_config: text
      settings:
        max_length: 123
    add:
      cardinality: 1
    change:
      settings: {  }
      status: true
      type: text_with_summary

EOF;
}