public function testRetrieveCollectionGet()
{
$collectionDataProvider = $this->prophesize(CollectionDataProviderInterface::class);
$collectionDataProvider->getCollection('Foo', 'get')->willReturn([])->shouldBeCalled();
$itemDataProvider = $this->prophesize(ItemDataProviderInterface::class);
$itemDataProvider->getItem()->shouldNotBeCalled();
$request = new Request([], [], ['_api_resource_class' => 'Foo', '_api_collection_operation_name' => 'get', '_api_format' => 'json', '_api_mime_type' => 'application/json']);
$request->setMethod(Request::METHOD_GET);
$event = $this->prophesize(GetResponseEvent::class);
$event->getRequest()->willReturn($request)->shouldBeCalled();
$listener = new ReadListener($collectionDataProvider->reveal(), $itemDataProvider->reveal());
$listener->onKernelRequest($event->reveal());
$this->assertSame([], $request->attributes->get('data'));
}