Skip to content

Commit

Permalink
Generate stubs for WordPress Tests 6.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Jul 17, 2024
1 parent 5b66522 commit bbb91eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.5
6.6.0
19 changes: 15 additions & 4 deletions wordpress-tests-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ protected function update_post_modified($post_id, $date)
/**
* Touches the given file and its directory if it doesn't already exist.
*
* This can be used to ensure a file that is implictly relied on in a test exists
* This can be used to ensure a file that is implicitly relied on in a test exists
* without it having to be built.
*
* @param string $file The file name.
Expand Down Expand Up @@ -1428,7 +1428,7 @@ public function create_many($count, $args = array(), $generation_definitions = \
* @param array|null $callbacks Optional. Array with callbacks to apply on the fields.
* Default null.
*
* @return array|WP_Error Combined array on success. WP_Error when default value is incorrent.
* @return array|WP_Error Combined array on success. WP_Error when default value is incorrect.
*/
public function generate_args($args = array(), $generation_definitions = \null, &$callbacks = \null)
{
Expand Down Expand Up @@ -2372,7 +2372,7 @@ public static function set_up_before_class()
/**
* Sets up the test fixture.
*
* Overrides wp_die(), pretends to be Ajax, and suppresses E_WARNINGs.
* Overrides wp_die(), pretends to be Ajax, and suppresses warnings.
*/
public function set_up()
{
Expand Down Expand Up @@ -2517,7 +2517,18 @@ public function get_canonical($test_url)
}
abstract class WP_Test_REST_TestCase extends \WP_UnitTestCase
{
protected function assertErrorResponse($code, $response, $status = \null)
/**
* Asserts that the REST API response has the specified error.
*
* @since 4.4.0
* @since 6.6.0 Added the `$message` parameter.
*
* @param string|int $code Expected error code.
* @param WP_REST_Response|WP_Error $response REST API response.
* @param int $status Optional. Status code.
* @param string $message Optional. Message to display when the assertion fails.
*/
protected function assertErrorResponse($code, $response, $status = \null, $message = '')
{
}
}
Expand Down

0 comments on commit bbb91eb

Please sign in to comment.