Make WordPress Core


Ignore:
Timestamp:
07/13/2021 10:43:42 AM (5 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/http/base.php

    r51403 r51415  
    2121        parent::setUp();
    2222
    23         if ( is_callable( array( 'WP_Http', '_getTransport' ) ) ) {
    24             $this->markTestSkipped( 'The WP_Http tests require a class-http.php file of r17550 or later.' );
    25             return;
    26         }
    27 
    2823        $class = 'WP_Http_' . ucfirst( $this->transport );
    2924        if ( ! call_user_func( array( $class, 'test' ) ) ) {
Note: See TracChangeset for help on using the changeset viewer.