function EventBaseTest::testGetMigration

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php \Drupal\Tests\migrate\Unit\Event\EventBaseTest::testGetMigration()
  2. 8.9.x core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php \Drupal\Tests\migrate\Unit\Event\EventBaseTest::testGetMigration()
  3. 10 core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php \Drupal\Tests\migrate\Unit\Event\EventBaseTest::testGetMigration()

Tests getMigration method.

@covers ::__construct @covers ::getMigration

File

core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php, line 22

Class

EventBaseTest
@coversDefaultClass \Drupal\migrate\Event\EventBase @group migrate

Namespace

Drupal\Tests\migrate\Unit\Event

Code

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

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