|
13 | 13 |
|
14 | 14 | namespace ApiPlatform\Core\Tests\Bridge\Symfony\Bundle\DependencyInjection;
|
15 | 15 |
|
| 16 | +use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface; |
| 17 | +use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface; |
16 | 18 | use ApiPlatform\Core\Bridge\Symfony\Bundle\DependencyInjection\ApiPlatformExtension;
|
| 19 | +use ApiPlatform\Core\DataProvider\CollectionDataProviderInterface; |
| 20 | +use ApiPlatform\Core\DataProvider\ItemDataProviderInterface; |
17 | 21 | use ApiPlatform\Core\Exception\InvalidArgumentException;
|
18 | 22 | use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
|
19 | 23 | use FOS\UserBundle\FOSUserBundle;
|
20 | 24 | use Nelmio\ApiDocBundle\NelmioApiDocBundle;
|
21 | 25 | use Prophecy\Argument;
|
22 | 26 | use Symfony\Bundle\SecurityBundle\SecurityBundle;
|
23 | 27 | use Symfony\Component\Config\FileLocator;
|
| 28 | +use Symfony\Component\DependencyInjection\ChildDefinition; |
24 | 29 | use Symfony\Component\DependencyInjection\ContainerBuilder;
|
25 | 30 | use Symfony\Component\DependencyInjection\Definition;
|
26 | 31 | use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
@@ -223,6 +228,24 @@ private function getContainerBuilderProphecy()
|
223 | 228 | });
|
224 | 229 |
|
225 | 230 | $containerBuilderProphecy = $this->prophesize(ContainerBuilder::class);
|
| 231 | + $childDefinitionProphecy = $this->prophesize(ChildDefinition::class); |
| 232 | + |
| 233 | + $containerBuilderProphecy->registerForAutoconfiguration(ItemDataProviderInterface::class) |
| 234 | + ->willReturn($childDefinitionProphecy)->shouldBeCalledTimes(1); |
| 235 | + $childDefinitionProphecy->addTag('api_platform.item_data_provider')->shouldBeCalledTimes(1); |
| 236 | + |
| 237 | + $containerBuilderProphecy->registerForAutoconfiguration(CollectionDataProviderInterface::class) |
| 238 | + ->willReturn($childDefinitionProphecy)->shouldBeCalledTimes(1); |
| 239 | + $childDefinitionProphecy->addTag('api_platform.collection_data_provider')->shouldBeCalledTimes(1); |
| 240 | + |
| 241 | + $containerBuilderProphecy->registerForAutoconfiguration(QueryItemExtensionInterface::class) |
| 242 | + ->willReturn($childDefinitionProphecy)->shouldBeCalledTimes(1); |
| 243 | + $childDefinitionProphecy->addTag('api_platform.doctrine.orm.query_extension.item')->shouldBeCalledTimes(1); |
| 244 | + |
| 245 | + $containerBuilderProphecy->registerForAutoconfiguration(QueryCollectionExtensionInterface::class) |
| 246 | + ->willReturn($childDefinitionProphecy)->shouldBeCalledTimes(1); |
| 247 | + $childDefinitionProphecy->addTag('api_platform.doctrine.orm.query_extension.collection')->shouldBeCalledTimes(1); |
| 248 | + |
226 | 249 | $containerBuilderProphecy->getParameter('kernel.bundles')->willReturn([
|
227 | 250 | 'DoctrineBundle' => DoctrineBundle::class,
|
228 | 251 | ])->shouldBeCalled();
|
|
0 commit comments