- Timestamp:
- 01/10/2019 09:05:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-validation.php
r43571 r44546 121 121 $this->assertTrue( rest_validate_value_from_schema( array( 1 ), $schema ) ); 122 122 $this->assertWPError( rest_validate_value_from_schema( array( true ), $schema ) ); 123 $this->assertWPError( rest_validate_value_from_schema( null, $schema ) ); 123 124 } 124 125 … … 146 147 $this->assertTrue( rest_validate_value_from_schema( '1,2,3', $schema ) ); 147 148 $this->assertWPError( rest_validate_value_from_schema( 'lol', $schema ) ); 149 $this->assertTrue( rest_validate_value_from_schema( '1,,', $schema ) ); 150 $this->assertTrue( rest_validate_value_from_schema( '', $schema ) ); 148 151 } 149 152 … … 170 173 $this->assertTrue( rest_validate_value_from_schema( 'ribs,chicken', $schema ) ); 171 174 $this->assertWPError( rest_validate_value_from_schema( 'chicken,coleslaw', $schema ) ); 175 $this->assertTrue( rest_validate_value_from_schema( 'ribs,chicken,', $schema ) ); 176 $this->assertTrue( rest_validate_value_from_schema( '', $schema ) ); 172 177 } 173 178
Note: See TracChangeset
for help on using the changeset viewer.