- Timestamp:
- 03/12/2020 02:40:29 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-validation.php
r47362 r47450 71 71 $this->assertTrue( rest_validate_value_from_schema( 'a@b.co', $schema ) ); 72 72 $this->assertWPError( rest_validate_value_from_schema( 'email', $schema ) ); 73 } 74 75 /** 76 * @ticket 49270 77 */ 78 public function test_format_hex_color() { 79 $schema = array( 80 'type' => 'string', 81 'format' => 'hex-color', 82 ); 83 $this->assertTrue( rest_validate_value_from_schema( '#000000', $schema ) ); 84 $this->assertTrue( rest_validate_value_from_schema( '#FFF', $schema ) ); 85 $this->assertWPError( rest_validate_value_from_schema( 'WordPress', $schema ) ); 73 86 } 74 87
Note: See TracChangeset
for help on using the changeset viewer.