You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The `Config` class uses a number of static properties and can have a performance impact on the tests too.
382
+
To get round both these issues, use the `ConfigDouble` class instead.
383
+
Generally speaking, only tests which test the behaviour of the `Config` class itself where it relates to the static properties, should use the real `Config` class for testing.
384
+
In such cases, the `PHP_CodeSniffer\Tests\Core\Config\AbstractRealConfigTestCase` should be used as the base test class.
385
+
* Tests for the `Runner` class often can't create their own `Config` object in the tests, so run into the same issue.
386
+
Those tests should use the `PHP_CodeSniffer\Tests\Core\Runner\AbstractRunnerTestCase` base class, which will ensure the Config is clean.
0 commit comments