server/src/tests/Libraries/Mergers/CocoonTextRdfMergerTest.php
changeset 520 d6adc4047ede
parent 504 4ab820b387da
child 526 cdaf9dfb5dfd
equal deleted inserted replaced
519:ef3e4841d506 520:d6adc4047ede
   101         $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified");
   101         $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified");
   102         foreach ($baseNode->all($this->inputGraphes['SOUND']->resource("http://purl.org/dc/terms/modified")) as $value) {
   102         foreach ($baseNode->all($this->inputGraphes['SOUND']->resource("http://purl.org/dc/terms/modified")) as $value) {
   103             $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph");
   103             $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph");
   104         }
   104         }
   105 
   105 
       
   106     }
       
   107 
       
   108 
       
   109     /**
       
   110      * Test merge dc11:creator from SOUND
       
   111      *
       
   112      * @return void
       
   113      */
       
   114     public function testCreatorSoundText() {
       
   115 
       
   116         $resGraph = $this->resGraph["SOUND_TEXT"];
       
   117 
       
   118         $providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type');
       
   119         $baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type');
       
   120         $this->assertNotNull($providedCHO);
       
   121         $this->assertNotNull($baseNode);
       
   122 
       
   123         $outputValuesStr = [];
       
   124         foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/elements/1.1/creator")) as $outputValue) {
       
   125             array_push($outputValuesStr, strval($outputValue));
       
   126         }
       
   127         $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/elements/1.1/creator");
       
   128         $this->assertCount(2, $outputValuesStr, "we must found 2 values http://purl.org/dc/elements/1.1/creator");
   106     }
   129     }
   107 
   130 
   108     /**
   131     /**
   109      * Test one to one mapping
   132      * Test one to one mapping
   110      *
   133      *