Make WordPress Core

Ticket #45128: 45128.1.diff

File 45128.1.diff, 1.6 KB (added by danielbachhuber, 6 years ago)
  • tests/phpunit/tests/rest-api/rest-users-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-users-controller.php b/tests/phpunit/tests/rest-api/rest-users-controller.php
    index 1a71bf6ae3..551fd83514 100644
    a b class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase { 
    798798
    799799        public function test_get_user_invalid_id() {
    800800                wp_set_current_user( self::$user );
    801                 $request = new WP_REST_Request( 'GET', '/wp/v2/users/100' );
     801                $request = new WP_REST_Request( 'GET', '/wp/v2/users/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
    802802                $response = $this->server->dispatch( $request );
    803803
    804804                $this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
    class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase { 
    20692069                $this->allow_user_to_manage_multisite();
    20702070                wp_set_current_user( self::$user );
    20712071
    2072                 $request = new WP_REST_Request( 'DELETE', '/wp/v2/users/100' );
     2072                $request = new WP_REST_Request( 'DELETE', '/wp/v2/users/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
    20732073                $request['force'] = true;
    20742074                $request->set_param( 'reassign', false );
    20752075                $response = $this->server->dispatch( $request );
    class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase { 
    21192119
    21202120                $request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d', $user_id ) );
    21212121                $request['force'] = true;
    2122                 $request->set_param( 'reassign', 100 );
     2122                $request->set_param( 'reassign', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
    21232123                $response = $this->server->dispatch( $request );
    21242124
    21252125                // Not implemented in multisite.