Skip to content

Commit abafba0

Browse files
committed
config(patches) update testcase-rest-api.php patch file
1 parent f1c94df commit abafba0

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

config/patches/core-phpunit/includes/testcase-rest-api.php.patch

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/includes/core-phpunit/includes/testcase-rest-api.php b/includes/core-phpunit/includes/testcase-rest-api.php
2-
index 27349809..2107abfc 100644
2+
index 99dd5e30..e9005563 100644
33
--- a/includes/core-phpunit/includes/testcase-rest-api.php
44
+++ b/includes/core-phpunit/includes/testcase-rest-api.php
55
@@ -1,6 +1,8 @@
@@ -12,3 +12,18 @@ index 27349809..2107abfc 100644
1212

1313
/**
1414
* Asserts that the REST API response has the specified error.
15+
@@ -8,10 +10,10 @@ abstract class WP_Test_REST_TestCase extends WP_UnitTestCase {
16+
* @since 4.4.0
17+
* @since 6.6.0 Added the `$message` parameter.
18+
*
19+
- * @param string|int $code Expected error code.
20+
- * @param WP_REST_Response|WP_Error $response REST API response.
21+
- * @param int $status Optional. Status code.
22+
- * @param string $message Optional. Message to display when the assertion fails.
23+
+ * @param string|int $code Expected error code.
24+
+ * @param \WP_REST_Response|\WP_Error $response REST API response.
25+
+ * @param int $status Optional. Status code.
26+
+ * @param string $message Optional. Message to display when the assertion fails.
27+
*/
28+
protected function assertErrorResponse( $code, $response, $status = null, $message = '' ) {
29+

0 commit comments

Comments
 (0)