public function DomStrReplaceTest::testTransform 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::testTransform()
@covers ::transform
@dataProvider providerTestTransform
File
- tests/
src/ Unit/ process/ DomStrReplaceTest.php, line 105
Class
- DomStrReplaceTest
- Tests the dom_str_replace process plugin.
Namespace
Drupal\Tests\migrate_plus\Unit\processCode
public function testTransform($input_string, $configuration, $output_string) {
$value = Html::load($input_string);
$document = (new DomStrReplace($configuration, 'dom_str_replace', []))
->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
$this
->assertTrue($document instanceof \DOMDocument);
$this
->assertEquals($output_string, Html::serialize($document));
}