mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 11:09:29 +00:00
Fixed tests
This commit is contained in:
parent
a399b629d1
commit
b4b758c356
2 changed files with 15 additions and 3 deletions
|
|
@ -95,6 +95,12 @@ final class BulkInfoProviderService
|
|||
return $searchResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $parts
|
||||
* @param array $fieldMappings
|
||||
* @param array<string, BatchInfoProviderInterface> $batchProviders
|
||||
* @return array
|
||||
*/
|
||||
private function processBatchProviders(array $parts, array $fieldMappings, array $batchProviders): array
|
||||
{
|
||||
$batchResults = [];
|
||||
|
|
@ -198,6 +204,12 @@ final class BulkInfoProviderService
|
|||
return $regularResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Part[] $parts
|
||||
* @param array $fieldMappings
|
||||
* @param string $providerKey
|
||||
* @return string[]
|
||||
*/
|
||||
private function collectKeywordsForProvider(array $parts, array $fieldMappings, string $providerKey): array
|
||||
{
|
||||
$keywords = [];
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ class BulkInfoProviderImportControllerTest extends WebTestCase
|
|||
['field' => 'mpn', 'providers' => ['test'], 'priority' => 2]
|
||||
],
|
||||
prefetchDetails: false,
|
||||
parts: [$part->getId()]
|
||||
parts: [$part]
|
||||
);
|
||||
|
||||
// The service may return an empty result or throw when no results are found
|
||||
|
|
@ -799,7 +799,7 @@ class BulkInfoProviderImportControllerTest extends WebTestCase
|
|||
['field' => 'test_supplier_spn', 'providers' => ['test'], 'priority' => 2]
|
||||
],
|
||||
prefetchDetails: false,
|
||||
parts: [$part->getId()]
|
||||
parts: [$part]
|
||||
);
|
||||
|
||||
// The service should be able to process the request and throw an exception when no results are found
|
||||
|
|
@ -833,7 +833,7 @@ class BulkInfoProviderImportControllerTest extends WebTestCase
|
|||
['field' => 'name', 'providers' => ['lcsc'], 'priority' => 1]
|
||||
],
|
||||
prefetchDetails: false,
|
||||
parts: [$part->getId()]
|
||||
parts: [$part]
|
||||
);
|
||||
|
||||
// The service should be able to process the request and throw an exception when no results are found
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue