public function testCreateCollectionShouldUseCollectionRouteMetadataWhenInjectingSelfProperty() { $collection = new Collection(['foo' => 'bar']); $collection->setCollectionRoute('hostname/resource'); $collection->setCollectionRouteOptions(['query' => ['version' => 2]]); $result = $this->plugin->createCollection($collection); $properties = $result->getProperties(); $idProperty = $properties->get('id'); $this->assertEquals(['query' => ['version' => 2]], $idProperty->getRouteOptions()); }