seedClient('Strict Mix'); $credentials = $this->createUserWithPermission('commercial.clients.manage'); $client = $this->authenticatedClient($credentials['username'], $credentials['password']); $client->request('PATCH', '/api/clients/'.$seed->getId(), [ 'headers' => ['Content-Type' => self::MERGE], 'json' => [ 'companyName' => 'Renamed Strict', 'siren' => '123456789', ], ]); // RG-1.28 : 403 strict (le champ comptable siren exige accounting.manage). self::assertResponseStatusCodeSame(403); // Aucun champ applique : le companyName d'origine est intact. $em = $this->getEm(); $em->clear(); $reloaded = $em->getRepository(ClientEntity::class)->find($seed->getId()); self::assertNotNull($reloaded); self::assertSame('STRICT MIX', $reloaded->getCompanyName()); } }