function StaticMapTest::testMapWithInvalidSource
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithInvalidSource()
- 8.9.x core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapwithInvalidSource()
- 10 core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithInvalidSource()
Tests when the source is invalid.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ StaticMapTest.php, line 55
Class
- StaticMapTest
- Tests the static map process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testMapWithInvalidSource() : void {
$this->expectException(MigrateSkipRowException::class);
$this->expectExceptionMessage(sprintf("No static mapping found for '%s' and no default value provided for destination '%s'.", Variable::export([
'bar',
]), 'destination_property'));
$this->plugin
->transform([
'bar',
], $this->migrateExecutable, $this->row, 'destination_property');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.