[wp-trac] [WordPress Trac] #56681: Failing unit tests on PHP 8.1 and 8.2

WordPress Trac noreply at wordpress.org
Sun Oct 2 00:31:31 UTC 2022


#56681: Failing unit tests on PHP 8.1 and 8.2
-------------------------------------------------+-------------------------
 Reporter:  desrosj                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.1
Component:  Build/Test Tools                     |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-patch has-unit-    |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 @jrf I've investigated the last remaining test failure. The test was added
 in [50717] and has to do with allowing authenticated users to read the
 contents of password protected posts if they have the `edit_post` meta
 capability for the post. As you've noted, the test could indeed be
 improved to check specifically for the expected result, which in this case
 appears to be `'This content is password protected.'` string, as the test
 creates a password protected post as an Editor and then tries to view it
 as a Contributor, which is (correctly) not allowed.

 However, I found that this is not the reason why it fails, the problem
 actually lies elsewhere. See #56712 for details and
 [https://github.com/WordPress/wordpress-develop/pull/3387 PR 3387] for a
 passing build.

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


More information about the wp-trac mailing list