public function DomStrReplaceTest::testConfigValidation in Migrate Plus 8.4
Same name and namespace in other branches
- 8.5 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\processCode
public function testConfigValidation(array $config_overrides, $message) {
$configuration = $config_overrides + $this->exampleConfiguration;
$value = '<p>A simple paragraph.</p>';
$this
->setExpectedException(InvalidPluginDefinitionException::class, $message);
(new DomStrReplace($configuration, 'dom_str_replace', []))
->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
}