Exemplo n.º 1
0
 public function testCreateCollectionFromMetadataWithoutForcedSelfProperties()
 {
     $set = new TestAsset\Collection([(object) ['id' => 'foo', 'name' => 'foo'], (object) ['id' => 'bar', 'name' => 'bar'], (object) ['id' => 'baz', 'name' => 'baz']]);
     $metadata = new MetadataMap(['ZFTest\\JsonLD\\Plugin\\TestAsset\\Collection' => ['is_collection' => true, 'route_name' => 'hostname/contacts', 'entity_route_name' => 'hostname/embedded', 'properties' => [], 'force_full_uri_id' => false]]);
     $this->plugin->setMetadataMap($metadata);
     $collection = $this->plugin->createCollectionFromMetadata($set, $metadata->get('ZFTest\\JsonLD\\Plugin\\TestAsset\\Collection'));
     $properties = $collection->getProperties();
     $this->assertFalse($properties->has('id'));
 }