From e41c513aa2eea1aa878274302f75f7c4276b4b22 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Thu, 16 Nov 2023 10:39:54 -0800 Subject: [PATCH] update test to return wp_trigger_error --- tests/phpunit/tests/functions/isWpVersionCompatible.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/functions/isWpVersionCompatible.php b/tests/phpunit/tests/functions/isWpVersionCompatible.php index ef7f4c33c7413..22e1e72ddd3e4 100644 --- a/tests/phpunit/tests/functions/isWpVersionCompatible.php +++ b/tests/phpunit/tests/functions/isWpVersionCompatible.php @@ -25,9 +25,10 @@ public function test_is_wp_version_compatible( $required, $expected ) { /** * Data provider. * + * @param string $required The minimum required WordPress version. * @return array */ - public function data_is_wp_version_compatible() { + public function data_is_wp_version_compatible( $required ) { global $wp_version; $version_parts = explode( '.', $wp_version ); @@ -88,8 +89,8 @@ public function data_is_wp_version_compatible() { // Improper WP version. 'improper trailing x.x.0' => array( - 'required' => '5.2.0', - 'expected' => true, + 'required' => $required, + 'expected' => "is_wp_version_compatible(): `$required` is not a valid WordPress version string.", ), 'correct version' => array( 'required' => '5.2',