function MigrateSourceTest::testNewHighwater
Tests 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[[api-linebreak]] @group migrate
 
Namespace
Drupal\Tests\migrate\UnitCode
public function testNewHighwater() : void {
  $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.