Closed andrewnicols closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
da7aa56
) 96.57% compared to head (b8f9eee
) 96.73%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Apart from the detail in the review, surely the major "problem" of this nice Sniff is to determine how do we apply it (only for X.Y and up, warning and error in 1-year, only for non-plugins, ...).
As far as it's not part of the coding-style neither enforced by PHPUnit incoming versions... we need to be careful about it (back to the discussion happening @ #92).
Ciao :-)
Okay,
I've:
I think we need to add this to the epic for PHPUnit 10 as a part of that puzzle and add it to our coding style. This isn't something radical.
For fixtures...
moodle/Tests/Sniffs/PHPUnit/fixtures
or
moodle/Tests/fixtures/PHPUnit
I've been doing the later lately and it seems that you've been doing the former. Of course, there are still a lot of fixtures to move so, at some time, we should decide which of the 2 fixtures dirs to use and go for it everywhere (for testing own Sniffs, other standards sniffs are another story).
For fixtures...
moodle/Tests/Sniffs/PHPUnit/fixtures
or
moodle/Tests/fixtures/PHPUnit
I've been doing the later lately and it seems that you've been doing the former. Of course, there are still a lot of fixtures to move so, at some time, we should decide which of the 2 fixtures dirs to use and go for it everywhere (for testing own Sniffs, other standards sniffs are another story).
I've been doing the former because it keeps the fixtures closer to the thing under test, and makes them easier to find, but I'm happy to move them. Let me know your preference.
I've been doing the former because it keeps the fixtures closer to the thing under test, and makes them easier to find, but I'm happy to move them. Let me know your preference.
Yeah, I think I agree with you, let's keep the fixtures closer to the the Test using them, specially now that we are creating subdirs for the tests.
Not in a hurry to move all current ones that have followed other paths, but let's go with your alternative for new ones.
So, just to be 100% sure, as commented above:
I'm happy with that (4.4dev), will generate some noise for plugins, but it's a good thing, I think. And prepares us for the future, together with #106 and other details that have arrived recently (static providers, ....).
So, with your 👍 , agreement!
Sold!
Fixes #102
The rationale for this change is based on the principle of least astonishment.
To solve this the idea is: