You are here

public function StaticMapTest::testWithNullSourceNotInMap in Drupal 10

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

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');
}