refactor(commercial) : RG-1.03 distributor/broker by category code

ClientProcessor::hasCategoryCode (ex hasCategoryType) verifie le code de la
Category (DISTRIBUTEUR/COURTIER) et non plus le type. Filtre liste/export
renomme categoryType -> categoryCode (filtre sur category.code). Tests RG-1.03
distributor + courtier ajoutes ; factory de test adaptee au type unique CLIENT.
This commit is contained in:
Matthieu
2026-06-02 09:20:58 +02:00
parent 636f2ccb8e
commit 596f716076
8 changed files with 129 additions and 47 deletions
@@ -74,14 +74,14 @@ final class ClientExportControllerTest extends AbstractCommercialApiTestCase
self::assertNotContains('OTHER BETA', $names);
}
public function testExportRespectsCategoryTypeFilter(): void
public function testExportRespectsCategoryCodeFilter(): void
{
$client = $this->createAdminClient();
$this->seedClient('Distrib Co', false, 'DISTRIBUTEUR');
$this->seedClient('Secteur Co', false, 'SECTEUR');
$names = $this->companyNames(
$client->request('GET', self::EXPORT_URL.'?categoryType=DISTRIBUTEUR')->getContent(),
$client->request('GET', self::EXPORT_URL.'?categoryCode=DISTRIBUTEUR')->getContent(),
);
self::assertContains('DISTRIB CO', $names);