WordPress.org

Make WordPress Core

Changeset 39899


Ignore:
Timestamp:
01/13/17 05:14:43 (4 months ago)
Author:
SergeyBiryukov
Message:

REST API: Update unit tests to account for the string changes in [39896].

See #39054.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-request-validation.php

    r38832 r39899  
    109109        ) ); 
    110110        $ret = rest_validate_request_arg( 1, $request, 'greaterthanmin' ); 
    111         $this->assertEquals( 'greaterthanmin must be greater than 2 (inclusive)', $ret->get_error_message() ); 
     111        $this->assertEquals( 'greaterthanmin must be greater than or equal to 2', $ret->get_error_message() ); 
    112112        $ret = rest_validate_request_arg( 2, $request, 'greaterthanmin' ); 
    113113        $this->assertTrue( $ret ); 
     
    125125        ) ); 
    126126        $ret = rest_validate_request_arg( 1, $request, 'greaterthanmin' ); 
    127         $this->assertEquals( 'greaterthanmin must be greater than 2 (exclusive)', $ret->get_error_message() ); 
     127        $this->assertEquals( 'greaterthanmin must be greater than 2', $ret->get_error_message() ); 
    128128        $ret = rest_validate_request_arg( 2, $request, 'greaterthanmin' ); 
    129         $this->assertEquals( 'greaterthanmin must be greater than 2 (exclusive)', $ret->get_error_message() ); 
     129        $this->assertEquals( 'greaterthanmin must be greater than 2', $ret->get_error_message() ); 
    130130        $ret = rest_validate_request_arg( 3, $request, 'greaterthanmin' ); 
    131131        $this->assertTrue( $ret ); 
     
    142142        ) ); 
    143143        $ret = rest_validate_request_arg( 11, $request, 'lessthanmax' ); 
    144         $this->assertEquals( 'lessthanmax must be less than 10 (inclusive)', $ret->get_error_message() ); 
     144        $this->assertEquals( 'lessthanmax must be less than or equal to 10', $ret->get_error_message() ); 
    145145        $ret = rest_validate_request_arg( 10, $request, 'lessthanmax' ); 
    146146        $this->assertTrue( $ret ); 
     
    158158        ) ); 
    159159        $ret = rest_validate_request_arg( 11, $request, 'lessthanmax' ); 
    160         $this->assertEquals( 'lessthanmax must be less than 10 (exclusive)', $ret->get_error_message() ); 
     160        $this->assertEquals( 'lessthanmax must be less than 10', $ret->get_error_message() ); 
    161161        $ret = rest_validate_request_arg( 10, $request, 'lessthanmax' ); 
    162         $this->assertEquals( 'lessthanmax must be less than 10 (exclusive)', $ret->get_error_message() ); 
     162        $this->assertEquals( 'lessthanmax must be less than 10', $ret->get_error_message() ); 
    163163        $ret = rest_validate_request_arg( 9, $request, 'lessthanmax' ); 
    164164        $this->assertTrue( $ret ); 
Note: See TracChangeset for help on using the changeset viewer.