Skip to content

Commit

Permalink
Improve error message for static test for redundant dependencies (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4de authored and eliseacornejo committed Apr 5, 2024
1 parent 488c103 commit 16f6617
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 16f6617

Please sign in to comment.