Fix the `test_widget_renders_completed_task_count` unit test (#45509)

This commit is contained in:
Leif Singer 2024-03-12 13:22:38 +01:00 committed by GitHub
parent 4cd89e4beb
commit 28e7351180
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix a failing unit test.

View File

@ -191,7 +191,7 @@ class WC_Admin_Dashboard_Setup_Test extends WC_Unit_Test_Case {
if ( $completed_tasks_count === $tasks_count ) {
$this->assertEmpty( $this->get_widget_output() );
} else {
$this->assertMatchesRegularExpression( "/Step {$step_number} of 5/", $this->get_widget_output() );
$this->assertMatchesRegularExpression( "/Step {$step_number} of {$tasks_count}/", $this->get_widget_output() );
}
}
}