Fixed tests

This commit is contained in:
Jan Böhmer 2025-09-14 23:14:00 +02:00
parent a399b629d1
commit b4b758c356
2 changed files with 15 additions and 3 deletions

View file

@ -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 = [];

View file

@ -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