[wp-trac] [WordPress Trac] #56740: set_up_before_class() / wpSetUpBeforeClass() are inconsistent and confusing
WordPress Trac
noreply at wordpress.org
Wed Oct 5 17:06:53 UTC 2022
#56740: set_up_before_class() / wpSetUpBeforeClass() are inconsistent and confusing
------------------------------+-----------------------------
Reporter: iandunn | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 4.4
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
There was some discussion in #55918 about standardizing on either
`set_up_before_class()`/`set_up_after_class()` or
`wpSetUpBeforeClass()`/`wpSetUpAfterClass()`. That would bring
consistency, and help reduce the confusion that exists around those
functions. That applies to the tear down functions as well.
See comment:7:ticket:55918 (and replies to it)
See https://wordpress.slack.com/archives/C03B0H5J0/p1660782746785649
See https://wordpress.slack.com/archives/C03B0H5J0/p1661876947032299
The `wp...` variants were introduced in r35186.
If a change is made here (and probably even if one isn't), it'd be good to
update [https://make.wordpress.org/core/handbook/testing/automated-testing
/writing-phpunit-tests/ the handbook page] to explain which functions
folks should use, and any caveats.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56740>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list