php-parallel-lint / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
282 stars 21 forks source link

SettingsParseArgumentsTest: improve the tests #112

Closed jrfnl closed 2 years ago

jrfnl commented 2 years ago

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

grogy commented 2 years ago

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