Ejemplo n.º 1
0
 public function testCreateCollectionShouldUseCollectionRouteMetadataWhenInjectingSelfLink()
 {
     $collection = new Collection(['foo' => 'bar']);
     $collection->setCollectionRoute('hostname/resource');
     $collection->setCollectionRouteOptions(['query' => ['version' => 2]]);
     $result = $this->plugin->createCollection($collection);
     $links = $result->getLinks();
     $self = $links->get('self');
     $this->assertEquals(['query' => ['version' => 2]], $self->getRouteOptions());
 }