Changeset 60067
- Timestamp:
- 03/21/2025 11:46:14 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-sanitization.php
r55457 r60067 14 14 'type' => 'number', 15 15 ); 16 $this->assert Equals( 1, rest_sanitize_value_from_schema( 1, $schema ) );16 $this->assertSame( 1.0, rest_sanitize_value_from_schema( 1, $schema ) ); 17 17 $this->assertSame( 1.10, rest_sanitize_value_from_schema( '1.10', $schema ) ); 18 $this->assert Equals( 1, rest_sanitize_value_from_schema( '1abc', $schema ) );19 $this->assert Equals(0, rest_sanitize_value_from_schema( 'abc', $schema ) );20 $this->assert Equals(0, rest_sanitize_value_from_schema( array(), $schema ) );18 $this->assertSame( 1.0, rest_sanitize_value_from_schema( '1abc', $schema ) ); 19 $this->assertSame( 0.0, rest_sanitize_value_from_schema( 'abc', $schema ) ); 20 $this->assertSame( 0.0, rest_sanitize_value_from_schema( array(), $schema ) ); 21 21 } 22 22
Note: See TracChangeset
for help on using the changeset viewer.