From d06a99dde2de7f53e5a0c1b1ec0ef33feb52124a Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Tue, 28 Dec 2021 18:53:30 +0000 Subject: [PATCH] Issue #2675006 by danflanagan8, robpowell, quietone, alexpott: Write UnitTest for MigrationConfigurationTrait and fix Exception Handling --- .../tests/src/Unit/MigrationConfigurationTraitTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php index 97da342b1dce..4ebbfc47d196 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php @@ -48,7 +48,7 @@ public function testGetLegacyDrupalVersion($expected_version_string, $schema_ver ->method('schema') ->willReturn($schema); - $actual_version_string = MigrationConfigurationTrait::getLegacyDrupalVersion($connection); + $actual_version_string = TestMigrationConfigurationTrait::getLegacyDrupalVersion($connection); $this->assertSame($expected_version_string, $actual_version_string); } @@ -142,3 +142,11 @@ public function providerTestGetLegacyDrupalVersion() { } } + +/** + * Test class that uses the trait we are testing. + */ +class TestMigrationConfigurationTrait { + use MigrationConfigurationTrait; + +} -- GitLab