support LIKE filtering for part lot user_barcode

This commit is contained in:
MayNiklas 2026-03-06 09:57:48 +01:00
parent 5a6b270525
commit b6717f8c0e
2 changed files with 14 additions and 3 deletions

View file

@ -60,6 +60,19 @@ final class PartLotsEndpointTest extends CrudEndpointTestCase
self::assertSame('/api/part_lots/2', $json['hydra:member'][0]['@id']);
}
public function testFilterByUserBarcodeUsingWildcard(): void
{
$response = self::createAuthenticatedClient()->request('GET', '/api/part_lots?user_barcode=lot2_%');
self::assertResponseIsSuccessful();
self::assertJsonContains([
'hydra:totalItems' => 1,
]);
$json = $response->toArray();
self::assertSame('/api/part_lots/2', $json['hydra:member'][0]['@id']);
}
public function testCreateItem(): void
{
$this->_testPostItem([