function MigrateSourceTest::testNewHighwater
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::testNewHighwater()
- 10 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::testNewHighwater()
- 11.x core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::testNewHighwater()
Test that a highwater mark newer than our saved one imports a row.
Throws
\Exception
File
-
core/
modules/ migrate/ tests/ src/ Unit/ MigrateSourceTest.php, line 268
Class
- MigrateSourceTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SourcePluginBase @group migrate
Namespace
Drupal\Tests\migrate\UnitCode
public function testNewHighwater() {
$configuration = [
'high_water_property' => [
'name' => 'timestamp',
],
];
// Set a highwater property field for source. Now we should have a row
// because the row timestamp is greater than the current highwater mark.
$source = $this->getSource($configuration, [], MigrateIdMapInterface::STATUS_IMPORTED, $this->row['timestamp'] - 1);
$source->rewind();
$this->assertInstanceOf(Row::class, $source->current());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.