equal
deleted
inserted
replaced
176 'http://purl.org/dc/terms/available', |
176 'http://purl.org/dc/terms/available', |
177 'http://purl.org/dc/terms/created', |
177 'http://purl.org/dc/terms/created', |
178 'http://purl.org/dc/terms/issued', |
178 'http://purl.org/dc/terms/issued', |
179 'http://purl.org/dc/elements/1.1/type', |
179 'http://purl.org/dc/elements/1.1/type', |
180 'http://purl.org/dc/elements/1.1/language', |
180 'http://purl.org/dc/elements/1.1/language', |
181 'http://purl.org/dc/terms/isPartOf', |
|
182 'http://purl.org/dc/terms/modified', |
181 'http://purl.org/dc/terms/modified', |
183 ]; |
182 ]; |
184 |
183 |
185 $coll = $this->resGraphes['BASE']->get('edm:Collection', '^rdf:type'); |
184 $coll = $this->resGraphes['BASE']->get('edm:Collection', '^rdf:type'); |
186 $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type'); |
185 $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type'); |
214 $this->assertInstanceOf("EasyRdf\Resource", $versionOfRes, "version Res must be a resource"); |
213 $this->assertInstanceOf("EasyRdf\Resource", $versionOfRes, "version Res must be a resource"); |
215 $this->assertEquals($sourceNode->getUri(), $versionOfRes->getUri(), "versionof res uri must be sams than source"); |
214 $this->assertEquals($sourceNode->getUri(), $versionOfRes->getUri(), "versionof res uri must be sams than source"); |
216 |
215 |
217 } |
216 } |
218 |
217 |
|
218 /** |
|
219 * Test mapping for isPartOf |
|
220 * |
|
221 * @return void |
|
222 */ |
|
223 public function testOneToOneCollectionIsPartOf() { |
|
224 $collection = $this->resGraphes['BASE']->get('edm:Collection', '^rdf:type'); |
|
225 $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type'); |
|
226 |
|
227 $this->assertNotNull($collection); |
|
228 $this->assertNotNull($sourceNode); |
|
229 |
|
230 $ispartOf = $collection->all('<http://www.europeana.eu/schemas/edm/isGatheredInto>'); |
|
231 $this->assertCount(1, $ispartOf, "Must have one collection node"); |
|
232 |
|
233 $this->assertEquals(config('corpusparole.corpus_doc_id_base_uri')."crdo-COLLECTION_ALA", strval($collection->get('<http://www.europeana.eu/schemas/edm/isGatheredInto>')), "the isPartOf mus equals ".config('corpusparole.corpus_doc_id_base_uri')."crdo-COLLECTION_ALA"); |
|
234 } |
|
235 |
|
236 |
219 } |
237 } |