You are here

public function DomTest::testConfigMethodInvalid in Migrate Plus 8.5

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

@covers ::__construct

File

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

Class

DomTest
Tests the dom process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testConfigMethodInvalid() : void {
  $configuration['method'] = 'invalid';
  $value = '<p>A simple paragraph.</p>';
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('The "method" must be "import" or "export".');
  (new Dom($configuration, 'dom', []))
    ->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
}