- 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-sanitization.php
r47362 r47450 78 78 } 79 79 80 /** 81 * @ticket 49270 82 */ 83 public function test_format_hex_color() { 84 $schema = array( 85 'type' => 'string', 86 'format' => 'hex-color', 87 ); 88 $this->assertEquals( '#000000', rest_sanitize_value_from_schema( '#000000', $schema ) ); 89 $this->assertEquals( '#FFF', rest_sanitize_value_from_schema( '#FFF', $schema ) ); 90 $this->assertEquals( '', rest_sanitize_value_from_schema( 'WordPress', $schema ) ); 91 } 92 80 93 public function test_type_array() { 81 94 $schema = array(
Note: See TracChangeset
for help on using the changeset viewer.