StubSourcePlugin example

/** * Tests basic row preparation. * * @covers ::prepareRow */
  public function testPrepareRow() {
    $this->migrationConfiguration['id'] = 'test_migration';

    // Get a new migration with an id.     $migration = $this->getMigration();
    $source = new StubSourcePlugin([], '', []$migration);
    $row = new Row();

    $module_handler = $this->prophesize(ModuleHandlerInterface::class);
    $module_handler->invokeAll('migrate_prepare_row', [$row$source$migration])
      ->willReturn([TRUE, TRUE])
      ->shouldBeCalled();
    $module_handler->invokeAll('migrate_' . $migration->id() . '_prepare_row', [$row$source$migration])
      ->willReturn([TRUE, TRUE])
      ->shouldBeCalled();
    $source->setModuleHandler($module_handler->reveal());

    
Home | Imprint | This part of the site doesn't use cookies.