diff -u b/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php b/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php --- b/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php +++ b/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php @@ -22,8 +22,8 @@ * - process: Prevents further processing of the input property when the value * is empty. * - message: (optional) A message to be logged in the {migrate_message_*} table - * for this row. Logging a message has effect only for 'row' method. If is - * missed, nothing is logged in the message table. + * for this row. Messages are only logged for the 'row' skip level. If not + * set, nothing is logged in the message table. * * Examples: * @@ -36,7 +36,7 @@ * message: 'Field field_name is missed' * @endcode * - * If field_name is empty, skips the entire row and log 'Field field_name is + * If field_name is empty, skips the entire row and logs 'Field field_name is * missed' in the message table. * * @code diff -u b/core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php b/core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php --- b/core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php +++ b/core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php @@ -32,7 +32,7 @@ * @endcode * * This will return $data['contact'] if it exists. Otherwise, the row will be - * skipped and the "Missed the 'data' key" will be registered. + * skipped and the message "Missed the 'data' key" will be logged. * * @see \Drupal\migrate\Plugin\MigrateProcessInterface * diff -u b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php --- b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php @@ -14,12 +14,12 @@ /** * @covers ::process - * @expectedException \Drupal\migrate\MigrateSkipProcessException */ public function testProcessSkipsOnEmpty() { $configuration['method'] = 'process'; (new SkipOnEmpty($configuration, 'skip_on_empty', [])) ->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->setExpectedException(\Drupal\migrate\MigrateSkipProcessException); } /** @@ -34,12 +34,12 @@ /** * @covers ::row - * @expectedException \Drupal\migrate\MigrateSkipRowException */ public function testRowSkipsOnEmpty() { $configuration['method'] = 'row'; (new SkipOnEmpty($configuration, 'skip_on_empty', [])) ->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->setExpectedException(\Drupal\migrate\MigrateSkipRowException); } /** diff -u b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php --- b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php @@ -16,7 +16,6 @@ * Tests that a skip row exception without a message is raised. * * @covers ::transform - * @expectedException \Drupal\migrate\MigrateSkipRowException * @expectedExceptionMessage */ public function testRowSkipWithoutMessage() { @@ -25,13 +24,13 @@ ]; $process = new SkipRowIfNotSet($configuration, 'skip_row_if_not_set', []); $process->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->setExpectedException(\Drupal\migrate\MigrateSkipRowException); } /** * Tests that a skip row exception with a message is raised. * * @covers ::transform - * @expectedException \Drupal\migrate\MigrateSkipRowException * @expectedExceptionMessage The 'some_key' key is not set */ public function testRowSkipWithMessage() { @@ -41,6 +40,7 @@ ]; $process = new SkipRowIfNotSet($configuration, 'skip_row_if_not_set', []); $process->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->setExpectedException(\Drupal\migrate\MigrateSkipRowException); } }