Make WordPress Core


Ignore:
Timestamp:
10/18/2023 10:39:19 AM (3 years 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/strEndsWith.php

    r56548 r56969  
    2727         */
    2828        public function test_str_ends_with( $expected, $haystack, $needle ) {
    29                 if ( ! function_exists( 'str_ends_with' ) ) {
    30                         $this->markTestSkipped( 'str_ends_with() is not available.' );
    31                 } else {
    32                         $this->assertSame(
    33                                 $expected,
    34                                 str_ends_with( $haystack, $needle )
    35                         );
    36                 }
     29                $this->assertSame( $expected, str_ends_with( $haystack, $needle ) );
    3730        }
    3831
Note: See TracChangeset for help on using the changeset viewer.