You are here

public function MigrateSourceTest::testPrepareRowFalse in Zircon Profile 8

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

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

File

core/modules/migrate/tests/src/Unit/MigrateSourceTest.php, line 174
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.');
}