Make WordPress Core


Ignore:
Timestamp:
07/13/2021 10:43:42 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Clean up skipping conditions and requirements for various tests.

This improves the consistency of test skipping and ensures that:

  • The @requires annotations use the right condition and format, and are on the right level (class vs. function).
  • Inline conditions with a markTestSkipped() call are only used when annotations cannot be used.
  • All markTestSkipped() calls contain a verbose explanation of why the test is being skipped.

Props jrf, hellofromTonya.
Fixes #53009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/template.php

    r51331 r51415  
    3636     * @group site_icon
    3737     * @covers ::get_site_icon_url
     38     * @requires function imagejpeg
    3839     */
    3940    function test_get_site_icon_url() {
     
    5051     * @group site_icon
    5152     * @covers ::site_icon_url
     53     * @requires function imagejpeg
    5254     */
    5355    function test_site_icon_url() {
     
    6365     * @group site_icon
    6466     * @covers ::has_site_icon
     67     * @requires function imagejpeg
    6568     */
    6669    function test_has_site_icon() {
     
    104107     * @group site_icon
    105108     * @covers ::wp_site_icon
     109     * @requires function imagejpeg
    106110     */
    107111    function test_wp_site_icon() {
     
    126130     * @group site_icon
    127131     * @covers ::wp_site_icon
     132     * @requires function imagejpeg
    128133     */
    129134    function test_wp_site_icon_with_filter() {
Note: See TracChangeset for help on using the changeset viewer.