server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php
changeset 143 023b6d467566
parent 125 e550b10fe3ca
--- a/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php	Mon Mar 21 14:04:19 2016 +0100
+++ b/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php	Fri Mar 25 17:03:45 2016 +0100
@@ -50,7 +50,6 @@
     ];
 
     const TEST_INPUT_ID = "crdo-UVE_MOCIKA_SOUND";
-    const TEST_GRAPH_URI = "http://corpusdelaparole.huma-num.fr/corpus/res/crdo-UVE_MOCIKA_SOUND";
     const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND";
 
 
@@ -65,6 +64,7 @@
     public function setUp() {
         parent::setUp();
 
+        $this->testGraphUri = config('corpusparole.corpus_doc_id_base_uri').CocoonTextRdfMapperTest::TEST_INPUT_ID;
         foreach(CocoonTextRdfMapperTest::TEST_INPUT_DOCS as $key => $inputDoc) {
             $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA", $inputDoc);
             $this->mappers[$key] = new CocoonTextRdfMapper($this->inputGraphes[$key]);
@@ -99,7 +99,7 @@
         //echo var_export($this->resGraphes['BASE']->toRdfPhp());
 
         $this->assertNotNull($this->resGraphes['BASE']);
-        $this->assertEquals(CocoonTextRdfMapperTest::TEST_GRAPH_URI, $this->resGraphes['BASE']->getUri(), "URIS must be translated");
+        $this->assertEquals($this->testGraphUri, $this->resGraphes['BASE']->getUri(), "URIS must be translated");
     }
 
     /**
@@ -112,7 +112,7 @@
         $resources = $this->resGraphes['BASE']->allOfType('ore:Aggregation');
 
         $this->assertCount(1, $resources, "Must found only one resources of type ore:Aggregation");
-        $this->assertEquals(CocoonTextRdfMapperTest::TEST_GRAPH_URI,$resources[0]->getUri());
+        $this->assertEquals($this->testGraphUri,$resources[0]->getUri());
     }
 
     /**
@@ -229,7 +229,7 @@
 
         $this->assertCount(2, $resources, "Must found three webresource");
 
-        $aggregation = $this->resGraphes['BASE']->resource(CocoonTextRdfMapperTest::TEST_GRAPH_URI);
+        $aggregation = $this->resGraphes['BASE']->resource($this->testGraphUri);
 
         foreach ($resources as $wres) {
             $mimetypes = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/format'));