diff -u b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php --- b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php @@ -23,20 +23,35 @@ /** * Tests exception is thrown when comment module is not enabled in the source. + * + * @dataProvider providerTestCheckRequirements */ - public function testCheckRequirements() { + public function testCheckRequirements($module) { // Disable comment in the source site. $db = $this->sourceDatabase; $db->update('system') - ->condition('name', 'comment') + ->condition('name', $module) ->fields([ 'status' => '0', ]) ->execute(); - $this->expectException(RequirementsException::class); - $this->expectExceptionMessage('The module comment is not enabled in the source site'); - $this->getMigration('d7_comment_entity_translation')->getSourcePlugin()->checkRequirements(); + $this->expectExceptionMessage("The module $module is not enabled in the source site"); + $this->getMigration('d7_comment_entity_translation') + ->getSourcePlugin() + ->checkRequirements(); + } + + /** + * Provides data for testCheckRequirements. + * + * @return string[][] + */ + public function providerTestCheckRequirements() { + return [ + ['comment'], + ['node'], + ]; } }