[wp-trac] [WordPress Trac] #46149: PHPUnit 8.x support

WordPress Trac noreply at wordpress.org
Fri Aug 6 21:17:36 UTC 2021

#46149: PHPUnit 8.x support
 Reporter:  SergeyBiryukov                       |       Owner:  netweb
     Type:  task (blessed)                       |      Status:  assigned
 Priority:  high                                 |   Milestone:  5.9
Component:  Build/Test Tools                     |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests early php8  |     Focuses:
  needs-dev-note                                 |

Comment (by SergeyBiryukov):

 In [changeset:"51562" 51562]:
 #!CommitTicketReference repository="" revision="51562"
 Build/Test Tools: Simplify redundant PHPUnit shim for

 PHPUnit 6 deprecated the `setExpectedException()` method in favor of the
 `expectException()`, `expectExceptionMessage()`, and
 `expectExceptionCode()` methods.

 `WP_UnitTestCase_Base::setExpectedException()` backfilled the old method.
 As the PHPUnit Polyfills have a polyfill for the ''new'' method, this
 backfill can now be simplified.

 This backfill ''should'' be removed in a future iteration, but is, for
 now, left in place so as not to break backward compatibility for
 plugin/theme test suites which extend the WP native test suite for their
 integration tests.

 Follow-up to [48996], [48997], [51559-51561].

 Props jrf.
 See #46149.

Ticket URL: <https://core.trac.wordpress.org/ticket/46149#comment:74>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list