X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FCommentVariablePerCommentTypeTest.php;fp=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FCommentVariablePerCommentTypeTest.php;h=dd1b1fd06c6dfd363a877f4800b04c813d50eb50;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariablePerCommentTypeTest.php b/web/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariablePerCommentTypeTest.php new file mode 100644 index 000000000..dd1b1fd06 --- /dev/null +++ b/web/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariablePerCommentTypeTest.php @@ -0,0 +1,62 @@ + 'page', + ], + [ + 'type' => 'story', + ], + ]; + + $tests[0]['source_data']['variable'] = [ + [ + 'name' => 'comment_subject_field_page', + 'value' => serialize(1), + ], + [ + 'name' => 'comment_subject_field_story', + 'value' => serialize(0), + ], + ]; + + // The expected results. + // Each result will also include a label and description, but those are + // static values set by the source plugin and don't need to be asserted. + $tests[0]['expected_data'] = [ + [ + 'comment_type' => 'comment', + ], + [ + 'comment_type' => 'comment_no_subject', + ], + ]; + + return $tests; + } + +}