You are here

public function MigratePostRowSaveEventTest::testGetRow in Drupal 9

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

Tests getRow method.

@covers ::__construct @covers ::getRow

File

core/modules/migrate/tests/src/Unit/Event/MigratePostRowSaveEventTest.php, line 33

Class

MigratePostRowSaveEventTest
@coversDefaultClass \Drupal\migrate\Event\MigratePostRowSaveEvent @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');
  $row = $this
    ->prophesize('\\Drupal\\migrate\\Row')
    ->reveal();
  $event = new MigratePostRowSaveEvent($migration, $message_service
    ->reveal(), $row, [
    1,
    2,
    3,
  ]);
  $this
    ->assertSame($row, $event
    ->getRow());
}