[wp-trac] [WordPress Trac] #43863: Fix broken check in testcase class to prevent multisite-only or single site-only tests from being executed

WordPress Trac noreply at wordpress.org
Wed Apr 25 22:30:24 UTC 2018


#43863: Fix broken check in testcase class to prevent multisite-only or single
site-only tests from being executed
------------------------------+------------------------
 Reporter:  flixos90          |       Owner:  flixos90
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  5.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  multisite
------------------------------+------------------------
Changes (by flixos90):

 * keywords:  needs-patch => has-patch


Comment:

 [attachment:43863.diff] fixes the issue by checking groups using the
 correct structure of the return value from PHPUnit's `getAnnotations()`.
 After diving into the PHPUnit codebase and some "blame" history, I noticed
 that that structure has always been like that, for now more than 9 years
 (when it was first introduced) - so there aren't any issues that would
 depend on certain PHPUnit versions.

 If you want to verify that this change actually fixes the issue, remove
 the `ms-required` group from your PHPUnit configuration file's exclude
 list and run the test suite (in non-multisite mode). Without the fix from
 this ticket, multisite-only tests are still executed, obviously causing
 fatal errors. With the fix from this ticket, they are correctly skipped.

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


More information about the wp-trac mailing list