You are here

public function DomStrReplaceTest::providerTestConfigEmpty in Migrate Plus 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/process/DomStrReplaceTest.php \Drupal\Tests\migrate_plus\Unit\process\DomStrReplaceTest::providerTestConfigEmpty()

Dataprovider for testConfigValidation().

File

tests/src/Unit/process/DomStrReplaceTest.php, line 50

Class

DomStrReplaceTest
Tests the dom_str_replace process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function providerTestConfigEmpty() {
  $cases = [
    'expression-null' => [
      [
        'expression' => NULL,
      ],
      "Configuration option 'expression' is required.",
    ],
    'mode-null' => [
      [
        'mode' => NULL,
      ],
      "Configuration option 'mode' is required.",
    ],
    'mode-invalid' => [
      [
        'mode' => 'invalid',
      ],
      'Configuration option "mode" only accepts the following values: attribute.',
    ],
    'attribute_options-null' => [
      [
        'attribute_options' => NULL,
      ],
      "Configuration option 'attribute_options' is required.",
    ],
    'search-null' => [
      [
        'search' => NULL,
      ],
      "Configuration option 'search' is required.",
    ],
    'replace-null' => [
      [
        'replace' => NULL,
      ],
      "Configuration option 'replace' is required.",
    ],
  ];
  return $cases;
}