diff options
author | Alex Pott | 2016-08-13 22:52:22 (GMT) |
---|---|---|
committer | Alex Pott | 2016-08-13 22:52:22 (GMT) |
commit | 24343f970b06efe32d6780028c4934f29f285f56 (patch) | |
tree | 10b1cfd89c9bd33222e9b5c47955dd28bca4f989 | |
parent | 0c0481ef864353e674e5c1bcd1462412809c1bbe (diff) |
Issue #2763283 by naught101, thomas73: Failure on comments with no subject
-rw-r--r-- | core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php | 2 | ||||
-rw-r--r-- | core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php index ea987be..5d16ed0 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php @@ -20,7 +20,7 @@ class CommentVariablePerCommentType extends CommentVariable { $return = array(); foreach ($node_types as $node_type => $data) { // Only 2 comment types depending on subject field visibility. - if (empty($data['comment_subject_field'])) { + if (!empty($data['comment_subject_field'])) { // Default label and description should be set in migration. $return['comment'] = array( 'comment_type' => 'comment', diff --git a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php index 0055a2c..75d0932 100644 --- a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php +++ b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php @@ -24,10 +24,10 @@ class CommentVariablePerCommentTypeTest extends MigrateSqlSourceTestCase { // 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. array( - 'comment_type' => 'comment_no_subject', + 'comment_type' => 'comment', ), array( - 'comment_type' => 'comment', + 'comment_type' => 'comment_no_subject', ), ); |