From 16f66179d6ee03c6b98f7f6a41b7499873cf7ff5 Mon Sep 17 00:00:00 2001 From: Rafal Janicki Date: Wed, 20 Mar 2024 10:57:46 +0000 Subject: [PATCH] Improve error message for static test for redundant dependencies (#224) --- .../testsuite/Magento/Test/Integrity/DependencyTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php index e81e679133cad..095b3f1c5fb05 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php @@ -59,6 +59,12 @@ class DependencyTest extends \PHPUnit\Framework\TestCase */ public const MAP_TYPE_REDUNDANT = 'redundant'; + /** + * Redundant dependencies error message + */ + public const UNUSED_DEPENDENCY_ERROR_MSG = + 'Some dependencies required by composer.json are not used in the module and must be removed:'; + /** * Count of directories in path */ @@ -869,7 +875,7 @@ public function testRedundant() } } if (!empty($output)) { - $this->fail("Redundant dependencies found!\r\n" . implode(' ', $output)); + $this->fail(self::UNUSED_DEPENDENCY_ERROR_MSG . "\r\n" . implode(' ', $output)); } }