You are here

public function NullCoalesceTest::testExceptionOnInvalidValue in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php \Drupal\Tests\migrate\Unit\process\NullCoalesceTest::testExceptionOnInvalidValue()

Tests that an exception is thrown for a non-array value.

@covers ::transform

File

core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php, line 22

Class

NullCoalesceTest
Tests the null_coalesce process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testExceptionOnInvalidValue() {
  $this
    ->expectException(MigrateException::class);
  (new NullCoalesce([], 'null_coalesce', []))
    ->transform('invalid', $this->migrateExecutable, $this->row, 'destination_property');
}