function SkipRowIfNotSetTest::testRowSkipWithMessage
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php \Drupal\Tests\migrate\Unit\process\SkipRowIfNotSetTest::testRowSkipWithMessage()
- 8.9.x core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php \Drupal\Tests\migrate\Unit\process\SkipRowIfNotSetTest::testRowSkipWithMessage()
- 11.x core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php \Drupal\Tests\migrate\Unit\process\SkipRowIfNotSetTest::testRowSkipWithMessage()
Tests that a skip row exception with a message is raised.
@covers ::transform
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ SkipRowIfNotSetTest.php, line 37
Class
- SkipRowIfNotSetTest
- Tests the skip row if not set process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testRowSkipWithMessage() : void {
$configuration = [
'index' => 'some_key',
'message' => "The 'some_key' key is not set",
];
$process = new SkipRowIfNotSet($configuration, 'skip_row_if_not_set', []);
$this->expectException(MigrateSkipRowException::class);
$this->expectExceptionMessage("The 'some_key' key is not set");
$process->transform('', $this->migrateExecutable, $this->row, 'destination_property');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.