Make WordPress Core


Ignore:
Timestamp:
10/18/2023 10:39:19 AM (15 months ago)
Author:
SergeyBiryukov
Message:

Tests: Remove some unnecessary function_exists() checks for compat functions.

Each of these functions already has a separate test for availability.

If any of them are unavailable, then the test should fail rather than be skipped.

Follow-up to [52038], [52039], [52040].

Props johnbillion.
See #59647.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/compat/arrayKeyLast.php

    r54064 r56969  
    2626     */
    2727    public function test_array_key_last( $expected, $arr ) {
    28         if ( ! function_exists( 'array_key_last' ) ) {
    29             $this->markTestSkipped( 'array_key_last() is not available.' );
    30         } else {
    31             $this->assertSame( $expected, array_key_last( $arr ) );
    32         }
     28        $this->assertSame( $expected, array_key_last( $arr ) );
    3329    }
    3430
Note: See TracChangeset for help on using the changeset viewer.