[ERP-72] Paginer toutes les collections API + regle pagination obligatoire #28

Merged
tristan merged 8 commits from feature/ERP-72-backend-l-paginer-toutes-les-collections-api-exist into develop 2026-05-29 14:15:42 +00:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit b84019fd12 - Show all commits
@@ -29,7 +29,7 @@ final class CategoryListTest extends AbstractCatalogApiTestCase
);
$client = $this->createAdminClient();
$response = $client->request('GET', '/api/categories');
$response = $client->request('GET', '/api/categories?pagination=false');
self::assertSame(200, $response->getStatusCode());
$data = $response->toArray();
@@ -62,7 +62,7 @@ final class CategoryListTest extends AbstractCatalogApiTestCase
);
$client = $this->createAdminClient();
$response = $client->request('GET', '/api/categories?includeDeleted=true');
$response = $client->request('GET', '/api/categories?includeDeleted=true&pagination=false');
self::assertSame(200, $response->getStatusCode());
$names = array_values(array_filter(
@@ -87,7 +87,7 @@ final class CategoryListTest extends AbstractCatalogApiTestCase
$this->createCategory(self::TEST_CATEGORY_PREFIX.'mid', $type);
$client = $this->createAdminClient();
$response = $client->request('GET', '/api/categories');
$response = $client->request('GET', '/api/categories?pagination=false');
self::assertSame(200, $response->getStatusCode());
$names = array_values(array_filter(
+3 -3
View File
@@ -75,7 +75,7 @@ final class PermissionApiTest extends AbstractApiTestCase
{
$client = $this->authenticatedClient('admin', 'admin');
$response = $client->request('GET', '/api/permissions', [
'query' => ['module' => 'core'],
'query' => ['module' => 'core', 'pagination' => 'false'],
]);
self::assertResponseIsSuccessful();
@@ -94,7 +94,7 @@ final class PermissionApiTest extends AbstractApiTestCase
{
$client = $this->authenticatedClient('admin', 'admin');
$response = $client->request('GET', '/api/permissions', [
'query' => ['orphan' => 'true'],
'query' => ['orphan' => 'true', 'pagination' => 'false'],
]);
self::assertResponseIsSuccessful();
@@ -114,7 +114,7 @@ final class PermissionApiTest extends AbstractApiTestCase
{
$client = $this->authenticatedClient('admin', 'admin');
$response = $client->request('GET', '/api/permissions', [
'query' => ['orphan' => 'false'],
'query' => ['orphan' => 'false', 'pagination' => 'false'],
]);
self::assertResponseIsSuccessful();
+1 -1
View File
@@ -146,7 +146,7 @@ final class RoleApiTest extends AbstractApiTestCase
public function testGetCollectionAsAdminReturnsRoles(): void
{
$client = $this->authenticatedClient('admin', 'admin');
$response = $client->request('GET', '/api/roles');
$response = $client->request('GET', '/api/roles?pagination=false');
self::assertResponseIsSuccessful();
$data = $response->toArray();