3 namespace Drupal\Tests\comment\Kernel\Plugin\migrate\source\d6;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests the Drupal 6 comment source w/ high water handling.
10 * @covers \Drupal\comment\Plugin\migrate\source\d6\Comment
14 class CommentSourceWithHighWaterTest extends MigrateSqlSourceTestBase {
19 public static $modules = ['comment', 'migrate_drupal'];
24 public function providerSource() {
28 $tests[0]['source_data']['comments'] = [
34 'subject' => 'subject value 1',
35 'comment' => 'comment value 1',
36 'hostname' => 'hostname value 1',
37 'timestamp' => 1382255613,
43 'format' => 'testformat1',
51 'subject' => 'subject value 2',
52 'comment' => 'comment value 2',
53 'hostname' => 'hostname value 2',
54 'timestamp' => 1382255662,
60 'format' => 'testformat2',
65 $tests[0]['source_data']['node'] = [
76 // The expected results.
77 $tests[0]['expected_data'] = [
83 'subject' => 'subject value 2',
84 'comment' => 'comment value 2',
85 'hostname' => 'hostname value 2',
86 'timestamp' => 1382255662,
92 'format' => 'testformat2',
97 // The expected count is the count returned by the query before the query
98 // is modified by SqlBase::initializeIterator().
99 $tests[0]['expected_count'] = 2;
101 $tests[0]['configuration']['high_water_property']['name'] = 'timestamp';
102 $tests[0]['high_water'] = $tests[0]['source_data']['comments'][0]['timestamp'];