diff --git a/tests/phpunit/tests/compat/arrayKeyFirst.php b/tests/phpunit/tests/compat/arrayKeyFirst.php index b3b97ad464..28db82e363 100644 --- a/tests/phpunit/tests/compat/arrayKeyFirst.php +++ b/tests/phpunit/tests/compat/arrayKeyFirst.php @@ -24,14 +24,7 @@ class Tests_Compat_arrayKeyFirst extends WP_UnitTestCase { * @param array $arr The array to get first key from. */ public function test_array_key_first( $expected, $arr ) { - if ( ! function_exists( 'array_key_first' ) ) { - $this->markTestSkipped( 'array_key_first() is not available.' ); - } else { - $this->assertSame( - $expected, - array_key_first( $arr ) - ); - } + $this->assertSame( $expected, array_key_first( $arr ) ); } /** diff --git a/tests/phpunit/tests/compat/arrayKeyLast.php b/tests/phpunit/tests/compat/arrayKeyLast.php index 77510c8320..819e850f13 100644 --- a/tests/phpunit/tests/compat/arrayKeyLast.php +++ b/tests/phpunit/tests/compat/arrayKeyLast.php @@ -25,11 +25,7 @@ class Tests_Compat_ArrayKeyLast extends WP_UnitTestCase { * @param array $arr The array to get last key from. */ public function test_array_key_last( $expected, $arr ) { - if ( ! function_exists( 'array_key_last' ) ) { - $this->markTestSkipped( 'array_key_last() is not available.' ); - } else { - $this->assertSame( $expected, array_key_last( $arr ) ); - } + $this->assertSame( $expected, array_key_last( $arr ) ); } /** diff --git a/tests/phpunit/tests/compat/strContains.php b/tests/phpunit/tests/compat/strContains.php index ee5bb6e1d3..381365b408 100644 --- a/tests/phpunit/tests/compat/strContains.php +++ b/tests/phpunit/tests/compat/strContains.php @@ -26,14 +26,7 @@ class Tests_Compat_strContains extends WP_UnitTestCase { * @param string $needle The substring to search for in `$haystack`. */ public function test_str_contains( $expected, $haystack, $needle ) { - if ( ! function_exists( 'str_contains' ) ) { - $this->markTestSkipped( 'str_contains() is not available.' ); - } else { - $this->assertSame( - $expected, - str_contains( $haystack, $needle ) - ); - } + $this->assertSame( $expected, str_contains( $haystack, $needle ) ); } /** diff --git a/tests/phpunit/tests/compat/strEndsWith.php b/tests/phpunit/tests/compat/strEndsWith.php index 7cf1e2b15d..8467675613 100644 --- a/tests/phpunit/tests/compat/strEndsWith.php +++ b/tests/phpunit/tests/compat/strEndsWith.php @@ -26,14 +26,7 @@ class Tests_Compat_StrEndsWith extends WP_UnitTestCase { * @param string $needle The substring to search for at the end of `$haystack`. */ public function test_str_ends_with( $expected, $haystack, $needle ) { - if ( ! function_exists( 'str_ends_with' ) ) { - $this->markTestSkipped( 'str_ends_with() is not available.' ); - } else { - $this->assertSame( - $expected, - str_ends_with( $haystack, $needle ) - ); - } + $this->assertSame( $expected, str_ends_with( $haystack, $needle ) ); } /** diff --git a/tests/phpunit/tests/compat/strStartsWith.php b/tests/phpunit/tests/compat/strStartsWith.php index 6bf72cd621..a7ea8ff3d9 100644 --- a/tests/phpunit/tests/compat/strStartsWith.php +++ b/tests/phpunit/tests/compat/strStartsWith.php @@ -26,14 +26,7 @@ class Tests_Compat_StrStartsWith extends WP_UnitTestCase { * @param string $needle The substring to search for at the start of `$haystack`. */ public function test_str_starts_with( $expected, $haystack, $needle ) { - if ( ! function_exists( 'str_starts_with' ) ) { - $this->markTestSkipped( 'str_starts_with() is not available.' ); - } else { - $this->assertSame( - $expected, - str_starts_with( $haystack, $needle ) - ); - } + $this->assertSame( $expected, str_starts_with( $haystack, $needle ) ); } /**