You are here

public function DomApplyStylesTest::testTransformInvalidInput in Migrate Plus 8.5

@covers ::transform

File

tests/src/Unit/process/DomApplyStylesTest.php, line 119

Class

DomApplyStylesTest
Tests the dom_apply_styles process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testTransformInvalidInput() : void {
  $value = 'string';
  $this
    ->expectException(MigrateSkipRowException::class);
  $this
    ->expectExceptionMessage('The dom_apply_styles plugin in the destinationproperty process pipeline requires a \\DOMDocument object. You can use the dom plugin to convert a string to \\DOMDocument.');
  (new DomApplyStyles($this->exampleConfiguration, 'dom_apply_styles', [], $this->configFactory))
    ->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
}