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/functions/anonymization.php

    r49006 r49025  
    2626     * @ticket 41083
    2727     * @ticket 43545
     28     * @requires function inet_ntop
     29     * @requires function inet_pton
    2830     *
    2931     * @param string $raw_ip          Raw IP address.
     
    3133     */
    3234    public function test_wp_privacy_anonymize_ip( $raw_ip, $expected_result ) {
    33         if ( ! function_exists( 'inet_ntop' ) || ! function_exists( 'inet_pton' ) ) {
    34             $this->markTestSkipped( 'This test requires both the inet_ntop() and inet_pton() functions.' );
    35         }
    36 
    3735        $actual_result = wp_privacy_anonymize_data( 'ip', $raw_ip );
    3836
Note: See TracChangeset for help on using the changeset viewer.