Verify that all the global settings listed in
ExtensionProcessor::$globalSettings are documented in the extension.json
schema.
Change-Id: If0ed09ed19b92934e869bbd40d8716a83e4b0a30
]
];
}
+
+ public function testGlobalSettingsDocumentedInSchema() {
+ global $IP;
+ $globalSettings = TestingAccessWrapper::newFromClass(
+ ExtensionProcessor::class )->globalSettings;
+
+ $schema = FormatJson::decode(
+ file_get_contents( "$IP/docs/extension.schema.json" ),
+ true
+ );
+ $missing = [];
+ foreach ( $globalSettings as $global ) {
+ if ( !isset( $schema['properties'][$global] ) ) {
+ $missing[] = $global;
+ }
+ }
+
+ $this->assertEquals( [], $missing,
+ "The following global settings are not documented in docs/extension.schema.json" );
+ }
}
/**