getDestinationIdValues example


  public function postRowSaveEventRecorder(MigratePostRowSaveEvent $event$name) {
    $this->state->set('migrate_events_test.post_row_save_event', [
      'event_name' => $name,
      'migration' => $event->getMigration(),
      'row' => $event->getRow(),
      'destination_id_values' => $event->getDestinationIdValues(),
    ]);
  }

}
/** * Tests getDestinationIdValues method. * * @covers ::__construct * @covers ::getDestinationIdValues */
  public function testGetDestinationIdValues() {
    $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
    $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface')->reveal();
    $row = $this->prophesize('\Drupal\migrate\Row')->reveal();
    $event = new MigratePostRowSaveEvent($migration$message_service$row[1, 2, 3]);
    $this->assertSame([1, 2, 3]$event->getDestinationIdValues());
  }

  /** * Tests getRow method. * * @covers ::__construct * @covers ::getRow */
  public function testGetRow() {
    $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
    $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface');
    
Home | Imprint | This part of the site doesn't use cookies.