- Timestamp:
- 05/03/2020 07:18:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-validation.php
r47627 r47753 84 84 $this->assertTrue( rest_validate_value_from_schema( '#FFF', $schema ) ); 85 85 $this->assertWPError( rest_validate_value_from_schema( 'WordPress', $schema ) ); 86 } 87 88 /** 89 * @ticket 50053 90 */ 91 public function test_format_uuid() { 92 $schema = array( 93 'type' => 'string', 94 'format' => 'uuid', 95 ); 96 $this->assertTrue( rest_validate_value_from_schema( '123e4567-e89b-12d3-a456-426655440000', $schema ) ); 97 $this->assertWPError( rest_validate_value_from_schema( '123e4567-e89b-12d3-a456-426655440000X', $schema ) ); 98 $this->assertWPError( rest_validate_value_from_schema( '123e4567-e89b-?2d3-a456-426655440000', $schema ) ); 86 99 } 87 100
Note: See TracChangeset
for help on using the changeset viewer.