mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-08 14:29:42 +00:00
[WIP] Add aggregated address search API endpoint
Introduced a new API endpoint `/api/1.0/main/address-reference/aggregated/search` for aggregated address reference search with support for query filtering. Extended repository with `findAggregatedBySearchString` method and updated materialized view `view_chill_main_address_reference`. Added test coverage and API specification details.
This commit is contained in:
@@ -56,6 +56,20 @@ class AddressReferenceRepositoryTest extends KernelTestCase
|
||||
self::assertIsInt($actual, $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider generateSearchString
|
||||
*/
|
||||
public function testFindAggreggateBySearchString(string $search, int|PostalCode|null $postalCode, string $text, ?array $expected = null): void
|
||||
{
|
||||
$actual = static::$repository->findAggregatedBySearchString($search, $postalCode);
|
||||
|
||||
self::assertIsIterable($actual, $text);
|
||||
|
||||
if (null !== $expected) {
|
||||
self::assertEquals($expected, iterator_to_array($actual));
|
||||
}
|
||||
}
|
||||
|
||||
public static function generateSearchString(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
|
Reference in New Issue
Block a user