Skip to content

Commit df3d5b5

Browse files
committed
fix tests
1 parent 11741c0 commit df3d5b5

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/Bridge/Symfony/Bundle/DataProvider/TraceableChainItemDataCollectorTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
use ApiPlatform\Core\Bridge\Symfony\Bundle\DataProvider\TraceableChainItemDataProvider;
1717
use ApiPlatform\Core\DataProvider\ChainItemDataProvider;
18-
use ApiPlatform\Core\DataProvider\DenormalizedIdentifiersAwareItemDataProviderInterface;
1918
use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
2019
use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
2120
use ApiPlatform\Core\Exception\ResourceClassNotSupportedException;
@@ -30,7 +29,7 @@ class TraceableChainItemDataCollectorTest extends TestCase
3029
public function testGetItem($provider, $context, $expected)
3130
{
3231
$dataProvider = new TraceableChainItemDataProvider($provider);
33-
$dataProvider->getItem('', '', null, $context);
32+
$dataProvider->getItem('', [], null, $context);
3433

3534
$result = $dataProvider->getProvidersResponse();
3635
$this->assertCount(\count($expected), $result);
@@ -48,7 +47,7 @@ public function testGetItem($provider, $context, $expected)
4847
public function testDeprecatedGetItem($provider, $context, $expected)
4948
{
5049
$dataProvider = new TraceableChainItemDataProvider($provider);
51-
$dataProvider->getItem('', '', null, $context);
50+
$dataProvider->getItem('', [], null, $context);
5251

5352
$result = $dataProvider->getProvidersResponse();
5453
$this->assertCount(\count($expected), $result);
@@ -63,7 +62,7 @@ public function dataProviderProvider(): iterable
6362
{
6463
yield 'Not a ChainItemDataProvider' => [
6564
new class() implements ItemDataProviderInterface {
66-
public function getItem(string $resourceClass, $id, string $operationName = null, array $context = [])
65+
public function getItem(string $resourceClass, array $identifiers, string $operationName = null, array $context = [])
6766
{
6867
return null;
6968
}
@@ -86,13 +85,13 @@ public function supports(string $resourceClass, string $operationName = null, ar
8685
return false;
8786
}
8887

89-
public function getItem(string $resourceClass, $id, string $operationName = null, array $context = [])
88+
public function getItem(string $resourceClass, array $identifiers, string $operationName = null, array $context = [])
9089
{
9190
return null;
9291
}
9392
},
94-
new class() implements RestrictedDataProviderInterface, DenormalizedIdentifiersAwareItemDataProviderInterface {
95-
public function getItem(string $resourceClass, /* array */ $id, string $operationName = null, array $context = [])
93+
new class() implements RestrictedDataProviderInterface {
94+
public function getItem(string $resourceClass, array $identifiers, string $operationName = null, array $context = [])
9695
{
9796
return null;
9897
}
@@ -103,7 +102,7 @@ public function supports(string $resourceClass, string $operationName = null, ar
103102
}
104103
},
105104
new class() implements ItemDataProviderInterface {
106-
public function getItem(string $resourceClass, $id, string $operationName = null, array $context = [])
105+
public function getItem(string $resourceClass, array $identifiers, string $operationName = null, array $context = [])
107106
{
108107
return null;
109108
}

0 commit comments

Comments
 (0)