PHP's getopt function sets boolean options to false, which is counter-intuitive. When we parse options, we must take that into account. That was already done for other boolean options, but I made a mistake in https://github.com/sirbrillig/phpcs-changed/pull/81 and did not correctly set the --no-vendor-phpcs option.
This was hidden because the unit tests do not use getopt and instead create the options manually and I forgot to set the option to false.
In this PR I fix those tests and then fix the bug.
In researching this bug, I also found a bunch of other options in the tests that did not correctly set their flags to false, which I've also fixed (thankfully they did not uncover any additional bugs).
PHP's
getopt
function sets boolean options tofalse
, which is counter-intuitive. When we parse options, we must take that into account. That was already done for other boolean options, but I made a mistake in https://github.com/sirbrillig/phpcs-changed/pull/81 and did not correctly set the--no-vendor-phpcs
option.This was hidden because the unit tests do not use
getopt
and instead create the options manually and I forgot to set the option tofalse
.In this PR I fix those tests and then fix the bug.
In researching this bug, I also found a bunch of other options in the tests that did not correctly set their flags to
false
, which I've also fixed (thankfully they did not uncover any additional bugs).