@@ -801,7 +801,7 @@ protected function update_post_modified($post_id, $date)
801801 /**
802802 * Touches the given file and its directory if it doesn't already exist.
803803 *
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
805805 * without it having to be built.
806806 *
807807 * @param string $file The file name.
@@ -1428,7 +1428,7 @@ public function create_many($count, $args = array(), $generation_definitions = \
14281428 * @param array|null $callbacks Optional. Array with callbacks to apply on the fields.
14291429 * Default null.
14301430 *
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 .
14321432 */
14331433 public function generate_args ($ args = array (), $ generation_definitions = \null, &$ callbacks = \null)
14341434 {
@@ -2372,7 +2372,7 @@ public static function set_up_before_class()
23722372 /**
23732373 * Sets up the test fixture.
23742374 *
2375- * Overrides wp_die(), pretends to be Ajax, and suppresses E_WARNINGs .
2375+ * Overrides wp_die(), pretends to be Ajax, and suppresses warnings .
23762376 */
23772377 public function set_up ()
23782378 {
@@ -2517,7 +2517,18 @@ public function get_canonical($test_url)
25172517}
25182518abstract class WP_Test_REST_TestCase extends \WP_UnitTestCase
25192519{
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 = '' )
25212532 {
25222533 }
25232534}
0 commit comments