You are here

public function MigrateSourceTest::testPrepareRowFalse in Drupal 9

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

Tests that we don't get a row if prepareRow() is false.

File

core/modules/migrate/tests/src/Unit/MigrateSourceTest.php, line 226
Contains \Drupal\Tests\migrate\Unit\MigrateSourceTest.

Class

MigrateSourceTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SourcePluginBase @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

public function testPrepareRowFalse() {
  $source = $this
    ->getSource([], [
    'prepare_row_false' => TRUE,
  ]);
  $source
    ->rewind();
  $this
    ->assertNull($source
    ->current(), 'No row is available when prepareRow() is false.');
}