You are here

public function DomTest::testImportNonRoot in Migrate Plus 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/process/DomTest.php \Drupal\Tests\migrate_plus\Unit\process\DomTest::testImportNonRoot()

@covers ::import

File

tests/src/Unit/process/DomTest.php, line 43

Class

DomTest
Tests the dom process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testImportNonRoot() {
  $configuration['method'] = 'import';
  $value = '<p>A simple paragraph.</p>';
  $document = (new Dom($configuration, 'dom', []))
    ->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
  $this
    ->assertTrue($document instanceof \DOMDocument);
}