- Timestamp:
- 10/31/2016 05:44:56 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-validation.php
r39046 r39048 104 104 $this->assertWPError( rest_validate_value_from_schema( array( true ), $schema ) ); 105 105 } 106 107 public function test_type_array_as_csv() { 108 $schema = array( 109 'type' => 'array', 110 'items' => array( 111 'type' => 'number', 112 ), 113 ); 114 $this->assertTrue( rest_validate_value_from_schema( '1', $schema ) ); 115 $this->assertTrue( rest_validate_value_from_schema( '1,2,3', $schema ) ); 116 $this->assertWPError( rest_validate_value_from_schema( 'lol', $schema ) ); 117 } 106 118 }
Note: See TracChangeset
for help on using the changeset viewer.