function MigratePreRowSaveEventTest::testGetRow

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php \Drupal\Tests\migrate\Unit\Event\MigratePreRowSaveEventTest::testGetRow()
  2. 10 core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php \Drupal\Tests\migrate\Unit\Event\MigratePreRowSaveEventTest::testGetRow()
  3. 11.x 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());
}

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