public function DomTest::testExportNonRoot in Migrate Plus 8.5
Same name and namespace in other branches
- 8.4 tests/src/Unit/process/DomTest.php \Drupal\Tests\migrate_plus\Unit\process\DomTest::testExportNonRoot()
@covers ::export
File
- tests/
src/ Unit/ process/ DomTest.php, line 68
Class
- DomTest
- Tests the dom process plugin.
Namespace
Drupal\Tests\migrate_plus\Unit\processCode
public function testExportNonRoot() : void {
$configuration['method'] = 'export';
$partial = '<p>A simple paragraph.</p>';
$document = Html::load($partial);
$value = (new Dom($configuration, 'dom', []))
->transform($document, $this->migrateExecutable, $this->row, 'destinationproperty');
$this
->assertEquals($value, $partial);
}