mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
test(SearchComposerTest): add test for provider icon generation
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
This commit is contained in:
parent
32d263e363
commit
9dfc0b1b23
1 changed files with 16 additions and 0 deletions
|
|
@ -156,6 +156,22 @@ class SearchComposerTest extends TestCase {
|
|||
]);
|
||||
}
|
||||
|
||||
public function testProviderIconGeneration(): void {
|
||||
$providerConfigs = [
|
||||
'provider1' => ['service' => 'provider1_service', 'appId' => 'app1', 'order' => 10],
|
||||
];
|
||||
|
||||
$mockData = $this->createMockProvidersAndRegistrations($providerConfigs);
|
||||
$this->setupRegistrationContextWithProviders($mockData['registrations']);
|
||||
$this->setupAppConfigForAllowedProviders();
|
||||
|
||||
$providers = $this->searchComposer->getProviders('/test/route', []);
|
||||
|
||||
$this->assertCount(1, $providers);
|
||||
$this->assertArrayHasKey('icon', $providers[0]);
|
||||
$this->assertStringContainsString('/apps/provider1/img/provider1.svg', $providers[0]['icon']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert providers array structure and expected sorting
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue