public function DomRemoveTest::testTransform in Migrate Plus 8.5
@covers ::transform
@dataProvider providerTestTransform
File
- tests/
src/ Unit/ process/ DomRemoveTest.php, line 22
Class
- DomRemoveTest
- Tests the dom_remove process plugin.
Namespace
Drupal\Tests\migrate_plus\Unit\processCode
public function testTransform($input_string, $configuration, $output_string) : void {
$value = Html::load($input_string);
$document = (new DomRemove($configuration, 'dom_remove', []))
->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
$this
->assertTrue($document instanceof \DOMDocument);
$this
->assertEquals($output_string, Html::serialize($document));
}