test(api) : adapte les tests de collections existants au standard de pagination (?pagination=false sur les fetchs 'tout-en-un')
This commit is contained in:
@@ -29,7 +29,7 @@ final class CategoryListTest extends AbstractCatalogApiTestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$client = $this->createAdminClient();
|
$client = $this->createAdminClient();
|
||||||
$response = $client->request('GET', '/api/categories');
|
$response = $client->request('GET', '/api/categories?pagination=false');
|
||||||
self::assertSame(200, $response->getStatusCode());
|
self::assertSame(200, $response->getStatusCode());
|
||||||
|
|
||||||
$data = $response->toArray();
|
$data = $response->toArray();
|
||||||
@@ -62,7 +62,7 @@ final class CategoryListTest extends AbstractCatalogApiTestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$client = $this->createAdminClient();
|
$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());
|
self::assertSame(200, $response->getStatusCode());
|
||||||
|
|
||||||
$names = array_values(array_filter(
|
$names = array_values(array_filter(
|
||||||
@@ -87,7 +87,7 @@ final class CategoryListTest extends AbstractCatalogApiTestCase
|
|||||||
$this->createCategory(self::TEST_CATEGORY_PREFIX.'mid', $type);
|
$this->createCategory(self::TEST_CATEGORY_PREFIX.'mid', $type);
|
||||||
|
|
||||||
$client = $this->createAdminClient();
|
$client = $this->createAdminClient();
|
||||||
$response = $client->request('GET', '/api/categories');
|
$response = $client->request('GET', '/api/categories?pagination=false');
|
||||||
self::assertSame(200, $response->getStatusCode());
|
self::assertSame(200, $response->getStatusCode());
|
||||||
|
|
||||||
$names = array_values(array_filter(
|
$names = array_values(array_filter(
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ final class PermissionApiTest extends AbstractApiTestCase
|
|||||||
{
|
{
|
||||||
$client = $this->authenticatedClient('admin', 'admin');
|
$client = $this->authenticatedClient('admin', 'admin');
|
||||||
$response = $client->request('GET', '/api/permissions', [
|
$response = $client->request('GET', '/api/permissions', [
|
||||||
'query' => ['module' => 'core'],
|
'query' => ['module' => 'core', 'pagination' => 'false'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::assertResponseIsSuccessful();
|
self::assertResponseIsSuccessful();
|
||||||
@@ -94,7 +94,7 @@ final class PermissionApiTest extends AbstractApiTestCase
|
|||||||
{
|
{
|
||||||
$client = $this->authenticatedClient('admin', 'admin');
|
$client = $this->authenticatedClient('admin', 'admin');
|
||||||
$response = $client->request('GET', '/api/permissions', [
|
$response = $client->request('GET', '/api/permissions', [
|
||||||
'query' => ['orphan' => 'true'],
|
'query' => ['orphan' => 'true', 'pagination' => 'false'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::assertResponseIsSuccessful();
|
self::assertResponseIsSuccessful();
|
||||||
@@ -114,7 +114,7 @@ final class PermissionApiTest extends AbstractApiTestCase
|
|||||||
{
|
{
|
||||||
$client = $this->authenticatedClient('admin', 'admin');
|
$client = $this->authenticatedClient('admin', 'admin');
|
||||||
$response = $client->request('GET', '/api/permissions', [
|
$response = $client->request('GET', '/api/permissions', [
|
||||||
'query' => ['orphan' => 'false'],
|
'query' => ['orphan' => 'false', 'pagination' => 'false'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::assertResponseIsSuccessful();
|
self::assertResponseIsSuccessful();
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ final class RoleApiTest extends AbstractApiTestCase
|
|||||||
public function testGetCollectionAsAdminReturnsRoles(): void
|
public function testGetCollectionAsAdminReturnsRoles(): void
|
||||||
{
|
{
|
||||||
$client = $this->authenticatedClient('admin', 'admin');
|
$client = $this->authenticatedClient('admin', 'admin');
|
||||||
$response = $client->request('GET', '/api/roles');
|
$response = $client->request('GET', '/api/roles?pagination=false');
|
||||||
|
|
||||||
self::assertResponseIsSuccessful();
|
self::assertResponseIsSuccessful();
|
||||||
$data = $response->toArray();
|
$data = $response->toArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user