|
15 | 15 |
|
16 | 16 | use ApiPlatform\Metadata\Get; |
17 | 17 | use ApiPlatform\State\Pagination\ArrayPaginator; |
| 18 | +use ApiPlatform\State\Pagination\MappedObjectPaginator; |
18 | 19 | use ApiPlatform\State\Provider\ObjectMapperProvider; |
19 | 20 | use ApiPlatform\State\ProviderInterface; |
20 | 21 | use PHPUnit\Framework\TestCase; |
@@ -160,7 +161,7 @@ public function testProvideMapsPaginator(): void |
160 | 161 | $provider = new ObjectMapperProvider($objectMapper, $decorated); |
161 | 162 |
|
162 | 163 | $result = $provider->provide($operation); |
163 | | - $this->assertInstanceOf(ArrayPaginator::class, $result); |
| 164 | + $this->assertInstanceOf(MappedObjectPaginator::class, $result); |
164 | 165 | $items = iterator_to_array($result); |
165 | 166 | $this->assertCount(2, $items); |
166 | 167 | $this->assertSame($targetResource1, $items[0]); |
@@ -192,7 +193,7 @@ public function testProvideMapsEmptyPaginator(): void |
192 | 193 | $provider = new ObjectMapperProvider($objectMapper, $decorated); |
193 | 194 |
|
194 | 195 | $result = $provider->provide($operation); |
195 | | - $this->assertInstanceOf(ArrayPaginator::class, $result); |
| 196 | + $this->assertInstanceOf(MappedObjectPaginator::class, $result); |
196 | 197 | $this->assertCount(0, iterator_to_array($result)); |
197 | 198 | } |
198 | 199 | } |
|
0 commit comments