3 namespace Drupal\Tests\comment\Kernel\Plugin\migrate\source\d6;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests d6_comment_variable source plugin.
10 * @covers \Drupal\comment\Plugin\migrate\source\d6\CommentVariable
13 class CommentVariableTest extends MigrateSqlSourceTestBase {
18 public static $modules = ['comment', 'migrate_drupal'];
23 public function providerSource() {
27 $tests[0]['source_data']['node_type'] = [
33 $tests[0]['source_data']['variable'] = [
35 'name' => 'comment_page',
36 'value' => serialize(1),
39 'name' => 'comment_default_mode_page',
40 'value' => serialize(1),
43 'name' => 'comment_default_order_page',
44 'value' => serialize(1),
47 'name' => 'comment_default_per_page_page',
48 'value' => serialize(50),
51 'name' => 'comment_controls_page',
52 'value' => serialize(1),
55 'name' => 'comment_anonymous_page',
56 'value' => serialize(1),
59 'name' => 'comment_subject_field_page',
60 'value' => serialize(1),
63 'name' => 'comment_preview_page',
64 'value' => serialize(1),
67 'name' => 'comment_form_location_page',
68 'value' => serialize(1),
72 // The expected results.
73 $tests[0]['expected_data'] = [
76 'comment_default_mode' => '1',
77 'comment_default_order' => '1',
78 'comment_default_per_page' => '50',
79 'comment_controls' => '1',
80 'comment_anonymous' => '1',
81 'comment_subject_field' => '1',
82 'comment_preview' => '1',
83 'comment_form_location' => '1',
84 'node_type' => 'page',
85 'comment_type' => 'comment',