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

WordPress Trac noreply at wordpress.org
Sat Aug 7 10:52:16 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:"51571" 51571]:
 {{{
 #!CommitTicketReference repository="" revision="51571"
 Tests: Fix tests failing due to `assertContains()` using strict checking.

 Since PHPUnit 8.0.2, the `assertContains()` method, when checking whether
 a value exists in an array, will do a strict type comparison of the
 values.

 This caused a couple of tests to fail. Using the correct data type in the
 test fixes that.

 References:
 *
 https://github.com/sebastianbergmann/phpunit/blob/8.0.6/ChangeLog-8.0.md#802
 ---2019-02-07
 * https://github.com/sebastianbergmann/phpunit/issues/3511
 *
 https://github.com/sebastianbergmann/phpunit/commit/6205f335954d00fa01992fe324a7eefbc954449e

 Follow-up to [51559-51570].

 Props jrf.
 See #46149.
 }}}

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


More information about the wp-trac mailing list