You are here

public function MigrateImportEventTest::testGetMigration in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/Event/MigrateImportEventTest.php \Drupal\Tests\migrate\Unit\Event\MigrateImportEventTest::testGetMigration()

Test getMigration method.

@covers ::__construct @covers ::getMigration

File

core/modules/migrate/tests/src/Unit/Event/MigrateImportEventTest.php, line 20

Class

MigrateImportEventTest
@coversDefaultClass \Drupal\migrate\Event\MigrateImportEvent @group migrate

Namespace

Drupal\Tests\migrate\Unit\Event

Code

public function testGetMigration() {
  $migration = $this
    ->prophesize('\\Drupal\\migrate\\Plugin\\MigrationInterface')
    ->reveal();
  $message_service = $this
    ->prophesize('\\Drupal\\migrate\\MigrateMessageInterface')
    ->reveal();
  $event = new MigrateImportEvent($migration, $message_service);
  $this
    ->assertSame($migration, $event
    ->getMigration());
}