3 namespace Drupal\Tests\migrate\Kernel;
6 * Tests the high water handling.
8 * @covers \Drupal\migrate_high_water_test\Plugin\migrate\source\HighWaterTest
11 class HighWaterNotJoinableTest extends MigrateSqlSourceTestBase {
16 public static $modules = ['migrate', 'migrate_drupal', 'migrate_high_water_test'];
21 public function providerSource() {
24 // Test high water when the map is not joinable.
26 $tests[0]['source_data']['high_water_node'] = [
44 // The expected results.
45 $tests[0]['expected_data'] = [
58 // The expected count is the count returned by the query before the query
59 // is modified by SqlBase::initializeIterator().
60 $tests[0]['expected_count'] = 3;
61 $tests[0]['configuration'] = [
62 'high_water_property' => [
66 $tests[0]['high_water'] = $tests[0]['source_data']['high_water_node'][0]['changed'];
68 // Test high water initialized to NULL.
69 $tests[1]['source_data'] = $tests[0]['source_data'];
70 $tests[1]['expected_data'] = [
87 $tests[1]['expected_count'] = $tests[0]['expected_count'];
88 $tests[1]['configuration'] = $tests[0]['configuration'];
89 $tests[1]['high_water'] = NULL;
91 // Test high water initialized to an empty string.
92 $tests[2]['source_data'] = $tests[0]['source_data'];
93 $tests[2]['expected_data'] = [
110 $tests[2]['expected_count'] = $tests[0]['expected_count'];
111 $tests[2]['configuration'] = $tests[0]['configuration'];
112 $tests[2]['high_water'] = '';