function MigrateSourceTest::testPrepareRowFalse

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

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.');
}

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