You are here

public function StaticMapTest::testWithNullSourceNotInMap in Drupal 9

Tests when the source is NULL.

File

core/modules/migrate/tests/src/Unit/process/StaticMapTest.php, line 97

Class

StaticMapTest
Tests the static map process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testWithNullSourceNotInMap() {
  $this
    ->expectException(MigrateSkipRowException::class);
  $this
    ->expectExceptionMessage("No static mapping found for 'NULL' and no default value provided for destination 'destination_property'");
  $this->plugin
    ->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property');
}