function MigrateSourceTest::getMigrateExecutable

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::getMigrateExecutable()
  2. 8.9.x core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::getMigrateExecutable()
  3. 11.x 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 443

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.