Skip to content

Commit

Permalink
Update test methods name
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Jan 9, 2025
1 parent ba6e245 commit c3dcaf1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,18 @@ public function test_run_with_errors_requires_at_least_latest_plus_two_version()

$errors = $check_result->get_errors();

delete_transient( 'wp_plugin_check_latest_version_info' );

$this->assertNotEmpty( $errors );

$filtered_items = wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_nonexistent_requires_wp' ) );

$this->assertCount( 1, $filtered_items );
$this->assertStringContainsString( 'Requires at least: 6.0', $filtered_items[0]['message'] );
$this->assertStringContainsString( 'This version of WordPress does not exist (yet).', $filtered_items[0]['message'] );

delete_transient( 'wp_plugin_check_latest_version_info' );
}

public function test_run_with_errors_requires_at_least_latest_plus_one_version() {
public function test_run_without_errors_requires_at_least_latest_plus_one_version() {
// Target plugin has "6.0" in plugin header.
set_transient( 'wp_plugin_check_latest_version_info', array( 'current' => '5.9.1' ) );

Expand All @@ -146,12 +146,12 @@ public function test_run_with_errors_requires_at_least_latest_plus_one_version()

$errors = $check_result->get_errors();

$this->assertEmpty( $errors );

delete_transient( 'wp_plugin_check_latest_version_info' );

$this->assertEmpty( $errors );
}

public function test_run_with_errors_requires_at_least_latest_version() {
public function test_run_without_errors_requires_at_least_latest_version() {
// Target plugin has "6.0" in plugin header.
set_transient( 'wp_plugin_check_latest_version_info', array( 'current' => '6.0.1' ) );

Expand All @@ -163,8 +163,8 @@ public function test_run_with_errors_requires_at_least_latest_version() {

$errors = $check_result->get_errors();

$this->assertEmpty( $errors );

delete_transient( 'wp_plugin_check_latest_version_info' );

$this->assertEmpty( $errors );
}
}

0 comments on commit c3dcaf1

Please sign in to comment.