[wp-trac] [WordPress Trac] #56681: Failing unit tests on P.HP 8.1 and 8.2
WordPress Trac
noreply at wordpress.org
Wed Sep 28 18:24:23 UTC 2022
#56681: Failing unit tests on P.HP 8.1 and 8.2
------------------------------+---------------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version:
Severity: normal | Keywords: needs-testing
Focuses: |
------------------------------+---------------------------
There are currently 2 unit tests that are failing when run on PHP 8.1 and
8.2. From an [https://github.com/WordPress/wordpress-
develop/actions/runs/3145622320/jobs/5113135707#step:19:790 example
workflow run]:
{{{
1) WP_Test_REST_Posts_Controller::test_get_post_draft_edit_context
Failed asserting that '<ul class="wp-block-latest-posts__list wp-block-
latest-posts"><li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3701">Protected: Hola</a><div class="wp-block-
latest-posts__post-excerpt">Hello World!</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3601">Post 28</a><div class="wp-block-latest-
posts__post-excerpt">Post excerpt 0005016</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3600">Post 27</a><div class="wp-block-latest-
posts__post-excerpt">Post excerpt 0005015</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3599">Post 26</a><div class="wp-block-latest-
posts__post-excerpt">Post excerpt 0005014</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3598">Post 25</a><div class="wp-block-latest-
posts__post-excerpt">Post excerpt 0005013</div></li>\n
</ul> <ul class="wp-block-latest-posts__list wp-block-latest-posts"><li><a
class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3701">Protected: Hola</a><div class="wp-block-
latest-posts__post-full-content">Hello World!</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3601">Post 28</a><div class="wp-block-latest-
posts__post-full-content">Post content 0005016</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3600">Post 27</a><div class="wp-block-latest-
posts__post-full-content">Post content 0005015</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3599">Post 26</a><div class="wp-block-latest-
posts__post-full-content">Post content 0005014</div></li>\n
<li><a class="wp-block-latest-posts__post-title"
href="http://example.org/?p=3598">Post 25</a><div class="wp-block-latest-
posts__post-full-content">Post content 0005013</div></li>\n
</ul>' does not contain "Hello World!".
/var/www/tests/phpunit/tests/rest-api/rest-posts-controller.php:1980
/var/www/vendor/bin/phpunit:123
2)
Tests_Theme_wpGetGlobalStylesheet::test_variables_in_classic_theme_with_presets_using_variables
small font size is 18px
Failed asserting that 'body{--wp--preset--color--black: #000000;--wp--
preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white:
#ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color
--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange:
#ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--
color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan:
#00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color
--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp
--preset--color--light: #f5f7f9;--wp--preset--color--dark: #000;--wp--
preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-
gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--
gradient--light-green-cyan-to-vivid-green-cyan: linear-
gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--
gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-
gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset
--gradient--luminous-vivid-orange-to-vivid-red: linear-
gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--
gradient--very-light-gray-to-cyan-bluish-gray: linear-
gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--
gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220)
0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130)
60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient
--blush-light-purple: linear-gradient(135deg,rgb(255,206,236)
0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-
gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62)
100%);--wp--preset--gradient--luminous-dusk: linear-
gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208)
100%);--wp--preset--gradient--pale-ocean: linear-
gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181)
100%);--wp--preset--gradient--electric-grass: linear-
gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--
gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252)
100%);--wp--preset--gradient--custom-gradient: linear-
gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%);--wp--preset--duotone
--dark-grayscale: url('#wp-duotone-dark-grayscale');--wp--preset--duotone
--grayscale: url('#wp-duotone-grayscale');--wp--preset--duotone--purple-
yellow: url('#wp-duotone-purple-yellow');--wp--preset--duotone--blue-red:
url('#wp-duotone-blue-red');--wp--preset--duotone--midnight: url('#wp-
duotone-midnight');--wp--preset--duotone--magenta-yellow: url('#wp-
duotone-magenta-yellow');--wp--preset--duotone--purple-green: url('#wp-
duotone-purple-green');--wp--preset--duotone--blue-orange: url('#wp-
duotone-blue-orange');--wp--preset--font-size--small: 13px;--wp--preset
--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--
preset--font-size--x-large: 42px;--wp--preset--font-size--custom:
100px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30:
0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50:
1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70:
3.38rem;--wp--preset--spacing--80: 5.06rem;}p{--wp--preset--color--light:
#f5f7f9;}' contains "--wp--preset--font-size--small: 18px".
/var/www/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php:153
}}}
This is not apparent because these two jobs are allowed to fail due to
deprecation warnings still being worked through on the road to full PHP
8.0-8.2 compatibility.
I've tried to track down the exact commit where the failures started
happening, but GitHub Action logs only persist for 90 days.
These should be investigated and understood before 6.1 to confirm sites
with these PHP versions won't have problems.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56681>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list