3 namespace Drupal\Tests\comment\Kernel\Plugin\migrate\source\d7;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests D7 comment source plugin.
10 * @covers \Drupal\comment\Plugin\migrate\source\d7\Comment
13 class CommentTest extends MigrateSqlSourceTestBase {
18 public static $modules = ['comment', 'migrate_drupal'];
23 public function providerSource() {
27 $tests[0]['source_data']['comment'] = [
33 'subject' => 'A comment',
35 'created' => '1421727536',
36 'changed' => '1421727536',
45 $tests[0]['source_data']['node'] = [
49 'type' => 'test_content_type',
54 'created' => '1421727515',
55 'changed' => '1421727515',
63 $tests[0]['source_data']['field_config_instance'] = [
67 'field_name' => 'comment_body',
68 'entity_type' => 'comment',
69 'bundle' => 'comment_node_test_content_type',
74 $tests[0]['source_data']['field_data_comment_body'] = [
76 'entity_type' => 'comment',
77 'bundle' => 'comment_node_test_content_type',
83 'comment_body_value' => 'This is a comment',
84 'comment_body_format' => 'filtered_html',
88 // The expected results.
89 $tests[0]['expected_data'] = [
95 'subject' => 'A comment',
97 'created' => '1421727536',
98 'changed' => '1421727536',
107 'value' => 'This is a comment',
108 'format' => 'filtered_html',