mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-27 11:41:36 +00:00
Reworked info provider system to merge all provider metadata into a unified DTO
This commit is contained in:
parent
661cc5a052
commit
071ffe322d
39 changed files with 412 additions and 533 deletions
|
|
@ -39,6 +39,16 @@ class InfoProviderEndpointTest extends AuthenticatedApiTestCase
|
|||
|
||||
$keys = array_column($json['hydra:member'], 'key');
|
||||
self::assertContains('test', $keys);
|
||||
|
||||
//The 'test' provider has a disabledHelp set internally, but it must not leak into the API response
|
||||
$testProvider = $json['hydra:member'][array_search('test', $keys, true)];
|
||||
self::assertArrayHasKey('capabilities', $testProvider);
|
||||
self::assertArrayNotHasKey('disabledHelp', $testProvider);
|
||||
self::assertArrayNotHasKey('oauthAppName', $testProvider);
|
||||
self::assertArrayNotHasKey('settingsClass', $testProvider);
|
||||
|
||||
//Capabilities must serialize as plain enum-name strings, not objects
|
||||
self::assertSame(['BASIC', 'FOOTPRINT'], $testProvider['capabilities']);
|
||||
}
|
||||
|
||||
public function testListInfoProvidersRequiresAuthentication(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue