You are here

public function DomStrReplaceTest::testConfigValidation in Migrate Plus 8.5

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

@covers ::__construct

@dataProvider providerTestConfigEmpty

File

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

Class

DomStrReplaceTest
Tests the dom_str_replace process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testConfigValidation(array $config_overrides, $message) : void {
  $configuration = $config_overrides + $this->exampleConfiguration;
  $value = '<p>A simple paragraph.</p>';
  $this
    ->expectException(InvalidPluginDefinitionException::class);
  $this
    ->expectExceptionMessage($message);
  (new DomStrReplace($configuration, 'dom_str_replace', []))
    ->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
}