You are here

public function MigratePreRowSaveEventTest::testGetRow in Drupal 9

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

Tests getRow method.

@covers ::__construct @covers ::getRow

File

core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php, line 19

Class

MigratePreRowSaveEventTest
@coversDefaultClass \Drupal\migrate\Event\MigratePreRowSaveEvent @group migrate

Namespace

Drupal\Tests\migrate\Unit\Event

Code

public function testGetRow() {
  $migration = $this
    ->prophesize('\\Drupal\\migrate\\Plugin\\MigrationInterface')
    ->reveal();
  $message_service = $this
    ->prophesize('\\Drupal\\migrate\\MigrateMessageInterface')
    ->reveal();
  $row = $this
    ->prophesize('\\Drupal\\migrate\\Row')
    ->reveal();
  $event = new MigratePreRowSaveEvent($migration, $message_service, $row);
  $this
    ->assertSame($row, $event
    ->getRow());
}