Make WordPress Core


Ignore:
Timestamp:
09/21/2020 01:25:38 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Convert a few more function_exists() and extension_loaded() checks to @requires annotations.

This better utilizes the PHPUnit native functionality.

Follow-up to [49024].

See #50639, #50640.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/Compression.php

    r48997 r49025  
    5555    /**
    5656     * Fetch the test text (gzdeflate)
     57     *
     58     * @requires function gzdeflate
    5759     */
    5860    public function test_gzdeflate() {
    59 
    60         if ( ! function_exists( 'gzdeflate' ) ) {
    61             $this->fail( 'gzdeflate function not available' );
    62         }
    6361
    6462        // Become an administrator.
     
    8280    /**
    8381     * Fetch the test text (gzencode)
     82     *
     83     * @requires function gzencode
    8484     */
    8585    public function test_gzencode() {
    86 
    87         if ( ! function_exists( 'gzencode' ) ) {
    88             $this->fail( 'gzencode function not available' );
    89         }
    9086
    9187        // Become an administrator.
Note: See TracChangeset for help on using the changeset viewer.