-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ErrorSuppressionTest: refactor to use data providers + bug fixes for the tests #3335
ErrorSuppressionTest: refactor to use data providers + bug fixes for the tests #3335
Commits on May 8, 2021
-
ErrorSuppressionTest::testSuppressError(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 7364463 - Browse repository at this point
Copy the full SHA 7364463View commit details -
ErrorSuppressionTest::testSuppressSomeErrors(): refactor to data prov…
…ider * Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 0d31521 - Browse repository at this point
Copy the full SHA 0d31521View commit details -
ErrorSuppressionTest::testSuppressWarning(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 58e8734 - Browse repository at this point
Copy the full SHA 58e8734View commit details -
ErrorSuppressionTest: move one test case out of
testSuppressLine()
... as it uses a different code pattern, so doesn't fit with the other tests for the (upcoming) data provider.
Configuration menu - View commit details
-
Copy full SHA for 8f2ec28 - Browse repository at this point
Copy the full SHA 8f2ec28View commit details -
ErrorSuppressionTest::testSuppressLine(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for d465698 - Browse repository at this point
Copy the full SHA d465698View commit details -
Configuration menu - View commit details
-
Copy full SHA for c14b49d - Browse repository at this point
Copy the full SHA c14b49dView commit details -
ErrorSuppressionTest::testNestedSuppressLine(): refactor to data prov…
…ider * Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for f9dfb9b - Browse repository at this point
Copy the full SHA f9dfb9bView commit details -
ErrorSuppressionTest: fix bug in testSuppressScope()
As the "no suppression" test would yield no errors, the test wasn't actually testing anything as there were no errors to suppress. Fixed now by using a different sniff to test against, which does yield an error on the line being suppressed by the rest of the tests.
Configuration menu - View commit details
-
Copy full SHA for 32ecc58 - Browse repository at this point
Copy the full SHA 32ecc58View commit details -
ErrorSuppressionTest::testSuppressScope(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 9165a9a - Browse repository at this point
Copy the full SHA 9165a9aView commit details -
ErrorSuppressionTest::testSuppressFile(): fix bugs in test
This fixes two bugs in two test cases for the `testSuppressFile()` method: 1. The code snippet as was, contained a parse error (missing semi-colon after class instantiation). 2. The code snippet did not contain anything which would trigger the warning the test is looking for in the first place, so these two tests would always pass.
Configuration menu - View commit details
-
Copy full SHA for e67a5df - Browse repository at this point
Copy the full SHA e67a5dfView commit details -
ErrorSuppressionTest::testSuppressFile(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 99d83b1 - Browse repository at this point
Copy the full SHA 99d83b1View commit details -
ErrorSuppressionTest::testDisableSelected(): refactor to data provider
**Note**: the "docblock" tests have changed to use the same basic code sample as the other tests. In practice this means that instead of having 0 errors and 0/1 warnings, they will now yield 1 error and 0/1 warnings. Functionally these tests still test the same principle. * Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for b1e74cc - Browse repository at this point
Copy the full SHA b1e74ccView commit details -
ErrorSuppressionTest::testDisableSelected(): add some more tests
By the looks of it, combining disabling at different levels and disabling error codes wasn't covered in the tests.
Configuration menu - View commit details
-
Copy full SHA for 888479a - Browse repository at this point
Copy the full SHA 888479aView commit details -
ErrorSuppressionTest::testEnableSelected(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 68c1867 - Browse repository at this point
Copy the full SHA 68c1867View commit details -
ErrorSuppressionTest::testIgnoreSelected(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 46f0100 - Browse repository at this point
Copy the full SHA 46f0100View commit details -
ErrorSuppressionTest::testCommenting(): refactor to data provider
* Maintains the exact same existing tests, now using a data provider. The data provider uses keys which allows for much more descriptive output when using the PHPUnit `--testdox` option, as well as for easier debugging if/when a test would fail. * Orders the tests in logical groups in the data provider. * Switches out `assertEquals()` (loose type comparison) for `assertSame()` (strict type comparison). * Caches the `$config` and `$ruleset` for the test via static local variables to prevent the test run from becoming slower due to the change to the data provider.
Configuration menu - View commit details
-
Copy full SHA for 41c1601 - Browse repository at this point
Copy the full SHA 41c1601View commit details