Skip to content

SettingsParseArgumentsTest: improve the tests #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 21, 2022

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Mar 17, 2022

SettingsParseArgumentsTest: refactor to dataprovider

Refactor the tests in the SettingsParseArgumentsTest class to use a data provider, which allow for adding more tests in a straight forward manner.

Includes expanding the actual tested settings values (values of the properties in the Settings class).
Previously, there were two tests which tested a range of property values, though still not all and multiple other tests which only verified one particular property value.

With the adjusted setup, all property values, except for the phpExecutable, will be tested for each and every test case.

Note: this is a 1-on-1 refactor of the test with all existing test cases still being tested but no other changes.

SettingsParseArgumentsTest: add additional test cases

... to make sure all possible arguments handled by the Settings::parseArguments() method are covered by tests.

SettingsParseArgumentsTest: add new test for handling of unsupported arguments

SettingsParseArgumentsTest: add @covers tags

jrfnl added 4 commits March 17, 2022 15:03
Refactor the tests in the `SettingsParseArgumentsTest` class to use a data provider, which allow for adding more tests in a straight forward manner.

Includes expanding the actual tested settings values (values of the properties in the `Settings` class).
Previously, there were two tests which tested a range of property values, though still not all and multiple other tests which only verified one particular property value.

With the adjusted setup, all property values, except for the `phpExecutable`, will be tested for each and every test case.

Note: this is a 1-on-1 refactor of the test with all existing test cases still being tested but no other changes.
... to make sure all possible arguments handled by the `Settings::parseArguments()` method are covered by tests.
@jrfnl jrfnl added this to the 2.0.0 milestone Mar 17, 2022
@jrfnl jrfnl requested a review from grogy March 17, 2022 14:57
@grogy
Copy link
Member

grogy commented Mar 21, 2022

Thank you, additionals tests after rewrite data provider is so better :)

@grogy grogy merged commit 9d21389 into develop Mar 21, 2022
@grogy grogy deleted the feature/settingsparseargumentstest-improve branch March 21, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants