Skip to content

Commit

Permalink
update test to return wp_trigger_error
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Nov 16, 2023
1 parent a012763 commit e41c513
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/phpunit/tests/functions/isWpVersionCompatible.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit e41c513

Please sign in to comment.