Make WordPress Core


Ignore:
Timestamp:
10/26/2023 08:31:45 PM (21 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use a @requires annotation for readonly() function test.

The function is only defined by WordPress core on PHP < 8.1.

Follow-up to [51586].

See #59647.

File:
1 edited

Legend:

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

    r51586 r57011  
    5757     * @ticket 53858
    5858     * @covers ::readonly
     59     * @requires PHP < 8.1
    5960     */
    6061    public function test_readonly_with_equal_values() {
    61         if ( ! function_exists( 'readonly' ) ) {
    62             $this->markTestSkipped( 'readonly() function is not available on PHP 8.1' );
    63         }
    64 
    6562        $this->setExpectedDeprecated( 'readonly' );
    6663
Note: See TracChangeset for help on using the changeset viewer.