From 191bf18e9006ba83a5481ed71df1c46557b810b3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Sep 2022 16:40:33 +0000 Subject: [PATCH] Tests: Correct some `@covers` tags in `wp_html_split()` and `wptexturize()` tests. As `preg_split()` is not a user-defined function, it causes notices when generating the code coverage report: {{{ "@covers ::preg_split" is invalid }}} Instead, it appears that the intention was to test the performance of these WordPress functions: * `get_html_split_regex()` * `_get_wptexturize_split_regex()` * `_get_wptexturize_shortcode_regex()` Follow-up to [34761], [53562]. See #39265, #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54051 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/formatting/wpHtmlSplit.php | 2 +- tests/phpunit/tests/formatting/wpTexturize.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/formatting/wpHtmlSplit.php b/tests/phpunit/tests/formatting/wpHtmlSplit.php index e606b1084c..a174c43d00 100644 --- a/tests/phpunit/tests/formatting/wpHtmlSplit.php +++ b/tests/phpunit/tests/formatting/wpHtmlSplit.php @@ -42,7 +42,7 @@ class Tests_Formatting_wpHtmlSplit extends WP_UnitTestCase { * * @dataProvider data_whole_posts * - * @covers ::preg_split + * @covers ::get_html_split_regex */ public function test_pcre_performance( $input ) { $regex = get_html_split_regex(); diff --git a/tests/phpunit/tests/formatting/wpTexturize.php b/tests/phpunit/tests/formatting/wpTexturize.php index 9bfc371461..0650c78181 100644 --- a/tests/phpunit/tests/formatting/wpTexturize.php +++ b/tests/phpunit/tests/formatting/wpTexturize.php @@ -2174,7 +2174,8 @@ String with a number followed by a single quote !q1!Expendables 3!q1! vestibulum * * @dataProvider data_whole_posts * - * @covers ::preg_split + * @covers ::_get_wptexturize_split_regex + * @covers ::_get_wptexturize_shortcode_regex */ public function test_pcre_performance( $input ) { global $shortcode_tags;