function MigrateSourceTest::testOutdatedHighwater
Tests that an outdated highwater mark does not cause a row to be imported.
File
- 
              core/
modules/ migrate/ tests/ src/ Unit/ MigrateSourceTest.php, line 249  
Class
- MigrateSourceTest
 - @coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SourcePluginBase[[api-linebreak]] @group migrate
 
Namespace
Drupal\Tests\migrate\UnitCode
public function testOutdatedHighwater() : void {
  $configuration = [
    'high_water_property' => [
      'name' => 'timestamp',
    ],
  ];
  $source = $this->getSource($configuration, [], MigrateIdMapInterface::STATUS_IMPORTED, $this->row['timestamp'] + 1);
  // The current highwater mark is now higher than the row timestamp so no row
  // is expected.
  $source->rewind();
  $this->assertNull($source->current(), 'Original highwater mark is higher than incoming row timestamp.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.