1414namespace ApiPlatform \Tests \Functional \Issues ;
1515
1616use ApiPlatform \Symfony \Bundle \Test \ApiTestCase ;
17+ use ApiPlatform \Tests \Fixtures \TestBundle \Document \Issue7349 \Foo7349 ;
1718use ApiPlatform \Tests \RecreateSchemaTrait ;
19+ use ApiPlatform \Tests \SetupClassResourcesTrait ;
1820use Illuminate \Foundation \Testing \RefreshDatabase ;
1921use Orchestra \Testbench \Concerns \WithWorkbench ;
2022use Symfony \Contracts \HttpClient \Exception \ClientExceptionInterface ;
@@ -27,8 +29,17 @@ class Issue7349Test extends ApiTestCase
2729{
2830 use RecreateSchemaTrait;
2931 use RefreshDatabase;
32+ use SetupClassResourcesTrait;
3033 use WithWorkbench;
3134
35+ /**
36+ * @return class-string[]
37+ */
38+ public static function getResources (): array
39+ {
40+ return [Foo7349::class];
41+ }
42+
3243 /**
3344 * When using partial pagination, totalItems should not be present.
3445 */
@@ -38,7 +49,7 @@ public function testGetPartialNoItemCount(): void
3849 $ this ->markTestSkipped ();
3950 }
4051
41- $ response = self ::createClient ()->request ('GET ' , '/foo7349s?page=1&itemsPerPage=3 ' , [
52+ $ response = self ::createClient ()->request ('GET ' , '/foo7349s?page=1&itemsPerPage=3&partial=true ' , [
4253 'headers ' => [
4354 'Accept ' => 'application/ld+json ' ,
4455 ],
@@ -62,7 +73,7 @@ public function testGetItemCount(): void
6273 $ this ->markTestSkipped ();
6374 }
6475
65- $ response = self ::createClient ()->request ('GET ' , '/foo7349s?page=1&itemsPerPage=3 ' , [
76+ $ response = self ::createClient ()->request ('GET ' , '/foo7349s?page=1&itemsPerPage=3&partial=false ' , [
6677 'headers ' => [
6778 'Accept ' => 'application/ld+json ' ,
6879 ],
0 commit comments