@@ -801,7 +801,7 @@ protected function update_post_modified($post_id, $date)
801
801
/**
802
802
* Touches the given file and its directory if it doesn't already exist.
803
803
*
804
- * This can be used to ensure a file that is implictly relied on in a test exists
804
+ * This can be used to ensure a file that is implicitly relied on in a test exists
805
805
* without it having to be built.
806
806
*
807
807
* @param string $file The file name.
@@ -1428,7 +1428,7 @@ public function create_many($count, $args = array(), $generation_definitions = \
1428
1428
* @param array|null $callbacks Optional. Array with callbacks to apply on the fields.
1429
1429
* Default null.
1430
1430
*
1431
- * @return array|WP_Error Combined array on success. WP_Error when default value is incorrent .
1431
+ * @return array|WP_Error Combined array on success. WP_Error when default value is incorrect .
1432
1432
*/
1433
1433
public function generate_args ($ args = array (), $ generation_definitions = \null, &$ callbacks = \null)
1434
1434
{
@@ -2372,7 +2372,7 @@ public static function set_up_before_class()
2372
2372
/**
2373
2373
* Sets up the test fixture.
2374
2374
*
2375
- * Overrides wp_die(), pretends to be Ajax, and suppresses E_WARNINGs .
2375
+ * Overrides wp_die(), pretends to be Ajax, and suppresses warnings .
2376
2376
*/
2377
2377
public function set_up ()
2378
2378
{
@@ -2517,7 +2517,18 @@ public function get_canonical($test_url)
2517
2517
}
2518
2518
abstract class WP_Test_REST_TestCase extends \WP_UnitTestCase
2519
2519
{
2520
- protected function assertErrorResponse ($ code , $ response , $ status = \null)
2520
+ /**
2521
+ * Asserts that the REST API response has the specified error.
2522
+ *
2523
+ * @since 4.4.0
2524
+ * @since 6.6.0 Added the `$message` parameter.
2525
+ *
2526
+ * @param string|int $code Expected error code.
2527
+ * @param WP_REST_Response|WP_Error $response REST API response.
2528
+ * @param int $status Optional. Status code.
2529
+ * @param string $message Optional. Message to display when the assertion fails.
2530
+ */
2531
+ protected function assertErrorResponse ($ code , $ response , $ status = \null, $ message = '' )
2521
2532
{
2522
2533
}
2523
2534
}
0 commit comments