From 381731aafc815c399b13a524c519fc1c3fe00018 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 14 Feb 2025 10:34:23 +0000 Subject: [PATCH] Tests: Correct failure messages for some tests. Follow-up to [54176], [57548], [58328]. Props poena, SergeyBiryukov. See #62280. git-svn-id: https://develop.svn.wordpress.org/trunk@59822 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tests/fonts/font-library/wpRestFontFamiliesController.php | 2 +- tests/phpunit/tests/rest-api/rest-themes-controller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php b/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php index 673d03606c..85f15d5c74 100644 --- a/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php +++ b/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php @@ -236,7 +236,7 @@ class Tests_REST_WpRestFontFamiliesController extends WP_Test_REST_Controller_Te $data = $response->get_data(); $this->assertSame( 200, $response->get_status(), 'The response status should be 200.' ); - $this->assertCount( 1, $data, 'There should be 2 properties in the response data.' ); + $this->assertCount( 1, $data, 'There should be 1 property in the response data.' ); $this->assertArrayHasKey( 'id', $data[0], 'The id property should exist in the response data.' ); $this->assertSame( $font_family->ID, $data[0]['id'], 'The id should match the expected ID in the response data.' ); } diff --git a/tests/phpunit/tests/rest-api/rest-themes-controller.php b/tests/phpunit/tests/rest-api/rest-themes-controller.php index c395d88e7c..d1ebb5b8ba 100644 --- a/tests/phpunit/tests/rest-api/rest-themes-controller.php +++ b/tests/phpunit/tests/rest-api/rest-themes-controller.php @@ -427,7 +427,7 @@ class WP_Test_REST_Themes_Controller extends WP_Test_REST_Controller_Testcase { $this->assertArrayHasKey( 'responsive-embeds', $theme_supports ); $this->assertArrayHasKey( 'title-tag', $theme_supports ); $this->assertArrayHasKey( 'wp-block-styles', $theme_supports ); - $this->assertCount( 24, $theme_supports, 'There should be 23 theme supports' ); + $this->assertCount( 24, $theme_supports, 'There should be 24 theme supports' ); } /**