mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-27 03:31:35 +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
|
|
@ -25,6 +25,7 @@ namespace App\Tests\State\Mcp;
|
|||
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use App\Mcp\DTO\InfoProviderSearchInput;
|
||||
use App\Services\InfoProviderSystem\DTOs\ProviderInfoDTO;
|
||||
use App\Services\InfoProviderSystem\DTOs\SearchResultDTO;
|
||||
use App\Services\InfoProviderSystem\DTOtoEntityConverter;
|
||||
use App\Services\InfoProviderSystem\PartInfoRetriever;
|
||||
|
|
@ -69,8 +70,8 @@ final class SearchInfoProvidersProcessorTest extends TestCase
|
|||
private function getMockProvider(string $key, bool $active = true): InfoProviderInterface
|
||||
{
|
||||
$mock = $this->createMock(InfoProviderInterface::class);
|
||||
$mock->method('getProviderKey')->willReturn($key);
|
||||
$mock->method('isActive')->willReturn($active);
|
||||
$mock->method('getProviderInfo')->willReturn(new ProviderInfoDTO(key: $key, name: $key));
|
||||
$mock->method('searchByKeyword')->willReturn([
|
||||
new SearchResultDTO(provider_key: $key, provider_id: '1', name: 'Element 1', description: 'desc'),
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue