Skip to content

Commit

Permalink
Remove "required" check
Browse files Browse the repository at this point in the history
  • Loading branch information
obenland committed Jan 9, 2025
1 parent e13879a commit bc905b7
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/includes/rest/class-test-application-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ public function test_get_item_schema() {
$this->assertArrayHasKey( 'schema', $response );
$schema = $response['schema'];

// Test required properties.
$required_properties = array( '@context', 'id', 'type', 'name', 'inbox', 'outbox' );
foreach ( $required_properties as $property ) {
$this->assertArrayHasKey( $property, $schema['properties'], "Missing required property: {$property}" );
if ( '@context' !== $property ) {
$this->assertTrue( $schema['properties'][ $property ]['required'], "Property {$property} should be required" );
}
}

// Test specific property types.
$this->assertEquals( array( 'array', 'object' ), $schema['properties']['@context']['type'] );
$this->assertEquals( 'string', $schema['properties']['id']['type'] );
Expand Down

0 comments on commit bc905b7

Please sign in to comment.