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
I find it unpleasant that we — the WordPress Project in general — have decided to go with CamelCase filenames for tests when on the style guide we're giving emphasis to consistent naming.
Yes, I agree with the hyphenated names. The camel case feels wrong surrounded by consistency everywhere else.
I'm not a fan of the WordPress testing organization; one function per file/class, etc. I think the inconsistency started with the "WordPress organization style" was introduced, the 1:1 class/test was what was there initially. I'm trying to figure out of that just because "I've always done it differently" or of there's some other reason I'm not a fan of that structure. I learned to have a 1:1 relationship between test classes and what's tested as that seems an easier way to use TDD which is where I find value in tests while testing-after-development to ensure the code does what you expect which seems to be where this structure offers the most value.
What?
Update PHP tests to follow WP core conventions.
Reference docs: https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#test-classes
Reference source: https://github.com/WordPress/wordpress-develop/tree/trunk/tests/phpunit/tests/blocks
Why?
Some of the plugin tests in the plugin don't follow that convention.
Expected
All tests should follow the same convention.
The text was updated successfully, but these errors were encountered: