function MigrateCommentTypeTest::providerTestNoCommentTypeMigration

Same name in this branch
  1. 11.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::providerTestNoCommentTypeMigration()
Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::providerTestNoCommentTypeMigration()
  2. 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::providerTestNoCommentTypeMigration()
  3. 10 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::providerTestNoCommentTypeMigration()
  4. 10 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::providerTestNoCommentTypeMigration()

Provides test cases for ::testNoCommentTypeMigration().

File

core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php, line 124

Class

MigrateCommentTypeTest
Tests the migration of comment types from Drupal 7.

Namespace

Drupal\Tests\comment\Kernel\Migrate\d7

Code

public static function providerTestNoCommentTypeMigration() {
    return [
        'Node module is disabled in source' => [
            'disabled_source_modules' => [
                'node',
            ],
            'expected_messages' => [
                'error' => [
                    'Migration d7_comment_type did not meet the requirements. The node module is not enabled in the source site.',
                ],
            ],
        ],
        'Comment module is disabled in source' => [
            'disabled_source_modules' => [
                'comment',
            ],
            'expected_messages' => [
                'error' => [
                    'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site.',
                ],
            ],
        ],
        'Node and comment modules are disabled in source' => [
            'disabled_source_modules' => [
                'comment',
                'node',
            ],
            'expected_messages' => [
                'error' => [
                    'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site.',
                ],
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.