[wp-trac] [WordPress Trac] #56846: All test classes that use the "wp" prefix should be renamed for consistency

WordPress Trac noreply at wordpress.org
Mon Oct 24 22:03:42 UTC 2022


#56846: All test classes that use the "wp" prefix should be renamed for consistency
---------------------------+-------------------------------
 Reporter:  antonvlasenko  |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  General        |     Version:  6.1
 Severity:  minor          |  Resolution:
 Keywords:                 |     Focuses:  coding-standards
---------------------------+-------------------------------

Comment (by ironprogrammer):

 +1 on consistency with `Wp`.

 If there is a wider objective for consistency beyond this specific prefix,
 consider that most test classes ''do'' adhere to the documented
 `Tests_Path_TitleCase` practice, so I feel those offer the largest
 sampling to work from.

 An important aspect of this policy is to make naming decisions ''easier''
 by following a simple pattern, which works well in most cases. There are
 certainly awkward applications of the policy, for instance if classname
 `Tests_oEmbed_HTTP_Headers` in `tests/oembed/headers.php` were to be
 revised, since it strays from the policy in multiple ways.

 Acronym usage in names also isn't covered in the unit test docs, though
 [https://developer.wordpress.org/coding-standards/wordpress-coding-
 standards/php/#naming-conventions it is in WPCS]. If there are to be
 exceptions to the current docs, it would help to touch on this as well.
 `Tests_XMLRPC_*` is a good example.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56846#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list