Issue #2692373 by heddn, rakesh.gectcr, edysmp, mikeryan, benjy: Value should be null when is produced skip process
parent
59357d6b2f
commit
31e613b3ce
|
@ -56,7 +56,7 @@ class MigrateCommentTest extends MigrateDrupal6TestBase {
|
|||
$this->assertIdentical('The first comment.', $comment->getSubject());
|
||||
$this->assertIdentical('The first comment body.', $comment->comment_body->value);
|
||||
$this->assertIdentical('filtered_html', $comment->comment_body->format);
|
||||
$this->assertIdentical('0', $comment->pid->target_id);
|
||||
$this->assertIdentical(NULL, $comment->pid->target_id);
|
||||
$this->assertIdentical('1', $comment->getCommentedEntityId());
|
||||
$this->assertIdentical('node', $comment->getCommentedEntityTypeId());
|
||||
$this->assertIdentical('en', $comment->language()->getId());
|
||||
|
@ -68,7 +68,7 @@ class MigrateCommentTest extends MigrateDrupal6TestBase {
|
|||
|
||||
$comment = $comment_storage->load(3);
|
||||
$this->assertIdentical('The second comment.', $comment->subject->value);
|
||||
$this->assertIdentical('0', $comment->pid->target_id);
|
||||
$this->assertIdentical(NULL, $comment->pid->target_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase {
|
|||
// Use Classy theme for testing markup output.
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
$this->installEntitySchema('entity_test');
|
||||
// Grant the 'view test entity' permission.
|
||||
$this->installConfig(array('user'));
|
||||
Role::load(RoleInterface::ANONYMOUS_ID)
|
||||
|
|
|
@ -378,6 +378,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
|
|||
$new_value[] = $plugin->transform($scalar_value, $this, $row, $destination);
|
||||
}
|
||||
catch (MigrateSkipProcessException $e) {
|
||||
$new_value[] = NULL;
|
||||
$break = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -391,6 +392,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
|
|||
$value = $plugin->transform($value, $this, $row, $destination);
|
||||
}
|
||||
catch (MigrateSkipProcessException $e) {
|
||||
$value = NULL;
|
||||
break;
|
||||
}
|
||||
$multiple = $multiple || $plugin->multiple();
|
||||
|
|
Loading…
Reference in New Issue