diff --git a/tests/phpunit/tests/pluggable.php b/tests/phpunit/tests/pluggable.php index 82c6ab16e8..276c021f70 100644 --- a/tests/phpunit/tests/pluggable.php +++ b/tests/phpunit/tests/pluggable.php @@ -102,7 +102,7 @@ class Tests_Pluggable extends WP_UnitTestCase { } foreach ( $test_files as $file ) { - preg_match_all( '#^function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions ); + preg_match_all( '#^\t?function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions ); foreach ( $functions[1] as $function ) { $data[] = array( diff --git a/tests/phpunit/tests/user/capabilities.php b/tests/phpunit/tests/user/capabilities.php index 7e588c3c23..317553a25d 100644 --- a/tests/phpunit/tests/user/capabilities.php +++ b/tests/phpunit/tests/user/capabilities.php @@ -401,7 +401,7 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $this->assertSame( 1, $matched ); $this->assertNotEmpty( $function ); - $matched = preg_match_all( '/^[\t]case \'([^\']+)/m', $function[0], $cases ); + $matched = preg_match_all( '/^[\t]{1,2}case \'([^\']+)/m', $function[0], $cases ); $this->assertNotEmpty( $matched ); $this->assertNotEmpty( $cases );