You are here

protected function MigrateSourceTest::getMigrateExecutable in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::getMigrateExecutable()

Gets a mock executable for the test.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.

Return value

\Drupal\migrate\MigrateExecutable The migrate executable.

1 call to MigrateSourceTest::getMigrateExecutable()
MigrateSourceTest::getSource in core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
Gets the source plugin to test.

File

core/modules/migrate/tests/src/Unit/MigrateSourceTest.php, line 447
Contains \Drupal\Tests\migrate\Unit\MigrateSourceTest.

Class

MigrateSourceTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SourcePluginBase @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

protected function getMigrateExecutable($migration) {

  /** @var \Drupal\migrate\MigrateMessageInterface $message */
  $message = $this
    ->createMock('Drupal\\migrate\\MigrateMessageInterface');

  /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher */
  $event_dispatcher = $this
    ->createMock('Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface');
  return new MigrateExecutable($migration, $message, $event_dispatcher);
}