Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/Fixtures/TestBundle/Document/Issue7349/Foo7349.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
*
* @author Maxime Valin <[email protected]>
*/
#[ApiResource]
#[ApiResource(
paginationClientPartial: true,
)]
#[ODM\Document]
class Foo7349
{
Expand Down
15 changes: 13 additions & 2 deletions tests/Functional/Issues/Issue7349Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
namespace ApiPlatform\Tests\Functional\Issues;

use ApiPlatform\Symfony\Bundle\Test\ApiTestCase;
use ApiPlatform\Tests\Fixtures\TestBundle\Document\Issue7349\Foo7349;
use ApiPlatform\Tests\RecreateSchemaTrait;
use ApiPlatform\Tests\SetupClassResourcesTrait;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Orchestra\Testbench\Concerns\WithWorkbench;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
Expand All @@ -27,8 +29,17 @@ class Issue7349Test extends ApiTestCase
{
use RecreateSchemaTrait;
use RefreshDatabase;
use SetupClassResourcesTrait;
use WithWorkbench;

/**
* @return class-string[]
*/
public static function getResources(): array
{
return [Foo7349::class];
}

/**
* When using partial pagination, totalItems should not be present.
*/
Expand All @@ -38,7 +49,7 @@ public function testGetPartialNoItemCount(): void
$this->markTestSkipped();
}

$response = self::createClient()->request('GET', '/foo7349s?page=1&itemsPerPage=3', [
$response = self::createClient()->request('GET', '/foo7349s?page=1&itemsPerPage=3&partial=true', [
'headers' => [
'Accept' => 'application/ld+json',
],
Expand All @@ -62,7 +73,7 @@ public function testGetItemCount(): void
$this->markTestSkipped();
}

$response = self::createClient()->request('GET', '/foo7349s?page=1&itemsPerPage=3', [
$response = self::createClient()->request('GET', '/foo7349s?page=1&itemsPerPage=3&partial=false', [
'headers' => [
'Accept' => 'application/ld+json',
],
Expand Down
Loading