Changeset 47450 for trunk/tests/phpunit/tests/rest-api/rest-controller.php
- Timestamp:
- 03/12/2020 02:40:29 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-controller.php
r47328 r47450 28 28 'type' => 'string', 29 29 ), 30 'somehex' => array( 31 'type' => 'string', 32 'format' => 'hex-color', 33 ), 30 34 'someenum' => array( 31 35 'type' => 'string', … … 164 168 'rest_invalid_email', 165 169 rest_validate_request_arg( 'd', $this->request, 'someemail' ) 170 ); 171 } 172 173 /** 174 * @ticket 49270 175 */ 176 public function test_validate_schema_format_hex_color() { 177 178 $this->assertTrue( 179 rest_validate_request_arg( '#000000', $this->request, 'somehex' ) 180 ); 181 182 $this->assertErrorResponse( 183 'rest_invalid_hex_color', 184 rest_validate_request_arg( 'wibble', $this->request, 'somehex' ) 166 185 ); 167 186 } … … 219 238 'somedate', 220 239 'someemail', 240 'somehex', 221 241 'someenum', 222 242 'someargoptions', … … 248 268 'somedate', 249 269 'someemail', 270 'somehex', 250 271 'someenum', 251 272 'someargoptions',
Note:
See TracChangeset
for help on using the changeset viewer.