378 $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type'); |
378 $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type'); |
379 |
379 |
380 $this->assertNotNull($providedCHO); |
380 $this->assertNotNull($providedCHO); |
381 $this->assertNotNull($sourceNode); |
381 $this->assertNotNull($sourceNode); |
382 |
382 |
383 $isGatheredInto = $providedCHO->all($this->resGraphes['BASE']->resource('http://www.europeana.eu/schemas/edm/isGatheredInto')); |
383 $isGatheredInto = $providedCHO->all('<http://www.europeana.eu/schemas/edm/isGatheredInto>'); |
384 $this->assertCount(2, $isGatheredInto, "Must have two collection node"); |
384 $this->assertCount(2, $isGatheredInto, "Must have two collection node"); |
385 |
385 |
386 $ispartOf = $providedCHO->all($this->resGraphes['BASE']->resource('http://purl.org/dc/terms/isPartOf')); |
386 $ispartOf = $providedCHO->all('<http://purl.org/dc/terms/isPartOf>'); |
387 $this->assertCount(1, $ispartOf, "Must have one collection node"); |
387 $this->assertCount(1, $ispartOf, "Must have one collection node"); |
388 |
388 |
389 $outputValuesStr = []; |
389 $outputValuesStr = []; |
390 foreach($providedCHO->all($this->resGraphes['BASE']->resource('http://www.europeana.eu/schemas/edm/isGatheredInto')) as $outputValue) { |
390 foreach($providedCHO->all('<http://www.europeana.eu/schemas/edm/isGatheredInto>') as $outputValue) { |
391 array_push($outputValuesStr, strval($outputValue)); |
391 array_push($outputValuesStr, strval($outputValue)); |
392 } |
392 } |
393 $this->assertNotEmpty($outputValuesStr, "we must found some values to test isGatheredInto"); |
393 $this->assertNotEmpty($outputValuesStr, "we must found some values to test isGatheredInto"); |
394 |
394 |
395 $this->assertContains("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE", $outputValuesStr, "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE not found in output graph"); |
395 $this->assertContains(config('corpusparole.corpus_doc_id_base_uri')."crdo-COLLECTION_LANGUESDEFRANCE", $outputValuesStr, config('corpusparole.corpus_doc_id_base_uri')."crdo-COLLECTION_LANGUESDEFRANCE not found in output graph"); |
396 $this->assertContains("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ESLO1", $outputValuesStr, "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ESLO1 not found in output graph"); |
396 $this->assertContains(config('corpusparole.corpus_doc_id_base_uri')."crdo-COLLECTION_ESLO1", $outputValuesStr, config('corpusparole.corpus_doc_id_base_uri')."crdo-COLLECTION_ESLO1 not found in output graph"); |
397 |
397 |
398 $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_010", strval($providedCHO->get($this->resGraphes['BASE']->resource('http://purl.org/dc/terms/isPartOf'))), "the isPartOf mus equals http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_010"); |
398 $this->assertEquals(config('corpusparole.corpus_doc_id_base_uri')."crdo-ESLO1_ENT_010", strval($providedCHO->get('<http://purl.org/dc/terms/isPartOf>')), "the isPartOf mus equals ".config('corpusparole.corpus_doc_id_base_uri')."crdo-ESLO1_ENT_010"); |
399 } |
399 } |
400 |
400 |
401 /** |
401 /** |
402 * Test one to one mapping spatial info |
402 * Test one to one mapping spatial info |
403 * |
403 * |