RegisterExternalStandardsTest: add new tests#165
Merged
Conversation
... as a helper to allow for comparing expected and actual registered paths from `--config-show`.
… multiple rulesets * As the behaviour shouldn't be different between Composer local/global, the test is only run against one of these (local). * The test is, however, run against multiple PHPCS versions to ensure the path to the standard as registered allows for picking up all expected rulesets in all supported PHPCS versions. Includes adding a fake standard with multiple rulesets as a fixture for this test.
…eset in nested dir
* As the behaviour shouldn't be different between Composer local/global, the test is only run against one of these (global).
* The test is run against one random PHPCS version as with the other tests in place, sufficient PHPCS versions are being tested.
Even though this means there is only _one_ test case, I've elected to still use a data provider to ensure that failing tests will mention the PHPCS version in the test name, which should help with debugging.
Includes adding a fake standard as a fixture for this test.
Potherca
approved these changes
Mar 5, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
TestCase: introduce new configShowToPathsArray() method
... as a helper to allow for comparing expected and actual registered paths from
--config-show.RegisterExternalStandardsTest: add test registering one standard with multiple rulesets
Includes adding a fake standard with multiple rulesets as a fixture for this test.
RegisterExternalStandardsTest: add test registering standard with ruleset in nested dir
Even though this means there is only one test case, I've elected to still use a data provider to ensure that failing tests will mention the PHPCS version in the test name, which should help with debugging.
Includes adding a fake standard as a fixture for this test.
Related to #92