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'] = [
78 // The expected results.
79 $tests[0]['expected_data'] = [
85 'subject' => 'subject value 2',
86 'comment' => 'comment value 2',
87 'hostname' => 'hostname value 2',
88 'timestamp' => 1382255662,
94 'format' => 'testformat2',
100 // The expected count is the count returned by the query before the query
101 // is modified by SqlBase::initializeIterator().
102 $tests[0]['expected_count'] = 2;
104 $tests[0]['configuration']['high_water_property']['name'] = 'timestamp';
105 $tests[0]['high_water'] = $tests[0]['source_data']['comments'][0]['timestamp'];