@@ -721,7 +721,7 @@ public function remove_added_uploads()
721721 * @since 4.0.0
722722 *
723723 * @param string $dir Path to the directory to scan.
724- * @return array List of file paths.
724+ * @return string[] List of file paths.
725725 */
726726 public function files_in_dir ($ dir )
727727 {
@@ -731,7 +731,7 @@ public function files_in_dir($dir)
731731 *
732732 * @since 4.0.0
733733 *
734- * @return array List of file paths.
734+ * @return string[] List of file paths.
735735 */
736736 public function scan_user_uploads ()
737737 {
@@ -834,6 +834,86 @@ protected function update_post_modified($post_id, $date)
834834 public static function touch ($ file )
835835 {
836836 }
837+ /**
838+ * Wrapper for `wp_safe_remote_request()` that retries on error and skips the test on timeout.
839+ *
840+ * @param string $url URL to retrieve.
841+ * @param array $args Optional. Request arguments. Default empty array.
842+ * @return array|WP_Error The response or WP_Error on failure.
843+ */
844+ protected function wp_safe_remote_request ($ url , $ args = array ())
845+ {
846+ }
847+ /**
848+ * Wrapper for `wp_safe_remote_get()` that retries on error and skips the test on timeout.
849+ *
850+ * @param string $url URL to retrieve.
851+ * @param array $args Optional. Request arguments. Default empty array.
852+ * @return array|WP_Error The response or WP_Error on failure.
853+ */
854+ protected function wp_safe_remote_get ($ url , $ args = array ())
855+ {
856+ }
857+ /**
858+ * Wrapper for `wp_safe_remote_post()` that retries on error and skips the test on timeout.
859+ *
860+ * @param string $url URL to retrieve.
861+ * @param array $args Optional. Request arguments. Default empty array.
862+ * @return array|WP_Error The response or WP_Error on failure.
863+ */
864+ protected function wp_safe_remote_post ($ url , $ args = array ())
865+ {
866+ }
867+ /**
868+ * Wrapper for `wp_safe_remote_head()` that retries on error and skips the test on timeout.
869+ *
870+ * @param string $url URL to retrieve.
871+ * @param array $args Optional. Request arguments. Default empty array.
872+ * @return array|WP_Error The response or WP_Error on failure.
873+ */
874+ protected function wp_safe_remote_head ($ url , $ args = array ())
875+ {
876+ }
877+ /**
878+ * Wrapper for `wp_remote_request()` that retries on error and skips the test on timeout.
879+ *
880+ * @param string $url URL to retrieve.
881+ * @param array $args Optional. Request arguments. Default empty array.
882+ * @return array|WP_Error The response or WP_Error on failure.
883+ */
884+ protected function wp_remote_request ($ url , $ args = array ())
885+ {
886+ }
887+ /**
888+ * Wrapper for `wp_remote_get()` that retries on error and skips the test on timeout.
889+ *
890+ * @param string $url URL to retrieve.
891+ * @param array $args Optional. Request arguments. Default empty array.
892+ * @return array|WP_Error The response or WP_Error on failure.
893+ */
894+ protected function wp_remote_get ($ url , $ args = array ())
895+ {
896+ }
897+ /**
898+ * Wrapper for `wp_remote_post()` that retries on error and skips the test on timeout.
899+ *
900+ * @param string $url URL to retrieve.
901+ * @param array $args Optional. Request arguments. Default empty array.
902+ * @return array|WP_Error The response or WP_Error on failure.
903+ */
904+ protected function wp_remote_post ($ url , $ args = array ())
905+ {
906+ }
907+ /**
908+ * Wrapper for `wp_remote_head()` that retries on error and skips the test on timeout.
909+ *
910+ * @param string $url URL to retrieve.
911+ * @param array $args Optional. Request arguments. Default empty array.
912+ * @return array|WP_Error The response or WP_Error on failure.
913+ */
914+ protected function wp_remote_head ($ url , $ args = array ())
915+ {
916+ }
837917}
838918/**
839919 * A class to handle additional command line arguments passed to the script.
@@ -931,6 +1011,42 @@ public function render($attributes = array(), $content = '')
9311011 {
9321012 }
9331013}
1014+ /**
1015+ * WP_Fake_Hasher for testing
1016+ *
1017+ * @package WordPress
1018+ * @since 6.8.0
1019+ */
1020+ /**
1021+ * Test class.
1022+ *
1023+ * @since 6.8.0
1024+ */
1025+ class WP_Fake_Hasher
1026+ {
1027+ public function __construct ()
1028+ {
1029+ }
1030+ /**
1031+ * Hashes a password.
1032+ *
1033+ * @param string $password Password to hash.
1034+ * @return string Hashed password.
1035+ */
1036+ public function HashPassword (string $ password )
1037+ {
1038+ }
1039+ /**
1040+ * Checks the password hash.
1041+ *
1042+ * @param string $password Password to check.
1043+ * @param string $hash Hash to check against.
1044+ * @return bool Whether the password hash is valid.
1045+ */
1046+ public function CheckPassword (string $ password , string $ hash )
1047+ {
1048+ }
1049+ }
9341050/**
9351051 * Unit tests covering WP_REST_Controller functionality using a flexible schema.
9361052 *
@@ -2230,7 +2346,12 @@ public function __invoke()
22302346 {
22312347 }
22322348}
2233- class MockPHPMailer extends \PHPMailer \PHPMailer \PHPMailer
2349+ /**
2350+ * Test class extending WP_PHPMailer.
2351+ *
2352+ * @since 4.5.0
2353+ */
2354+ class MockPHPMailer extends \WP_PHPMailer
22342355{
22352356 public $ mock_sent = array ();
22362357 public function preSend ()
0 commit comments