Commit b783a4e
committed
DB/RestrictedClasses: remove unnecessary call to
Calling `parent::setUpPrerequisites()` inside `RestrictedClassesUnitTest::enhanceGroups()` is not necessary, and it was leading to this method being called twice. PHPUnit already calls it as it used the `@before` that.
I found this in the context of the work to prepare this codebase for PHPCS 4.0 as `parent::setUpPrerequisites()` was removed from the sniff test framework in 4.0.
Originally, `RestrictedClassesUnitTest::enhanceGroups()` was called `setUp()` and called `parent::setUp()` (https://github.com/WordPress/WordPress-Coding-Standards/blob/3b9ae92607295548df357e108fd27090cf89d1d7/WordPress/Tests/DB/RestrictedClassesUnitTest.php#L34-L35). But later it was renamed and then it probably didn't made sense to continue calling `setUp()` (which was later renamed to `setUpPrerequisites()`): WordPress@00b895c.parent::setUpPrerequisites()
1 parent f62f272 commit b783a4e
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
0 commit comments