From bc905b7db6b498bcea43da00756468abcac85792 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 9 Jan 2025 16:40:18 -0600 Subject: [PATCH] Remove "required" check --- .../includes/rest/class-test-application-controller.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/includes/rest/class-test-application-controller.php b/tests/includes/rest/class-test-application-controller.php index 4e2c7810c..c183680d0 100644 --- a/tests/includes/rest/class-test-application-controller.php +++ b/tests/includes/rest/class-test-application-controller.php @@ -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'] );