server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php
changeset 115 34ffc04cef62
parent 114 8af5ed0521a2
child 116 e60c55988ed4
--- a/server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php	Wed Feb 03 00:40:35 2016 +0100
+++ b/server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php	Wed Feb 03 18:34:44 2016 +0100
@@ -249,6 +249,25 @@
          $this->assertEquals(CocoonSoundRdfMapperTest::TEST_CHO_URI,$resources[0]);
      }
 
+     /**
+      * Test providedCHO identifier.
+      *
+      * @return void
+      */
+     public function testProvidedChoId() {
+         $resources = $this->resGraphes['BASE']->allOfType('edm:ProvidedCHO');
+
+         $this->assertCount(1, $resources, "Must found only one resources of type edm:ProvidedCHO");
+         $providedCHO = $resources[0];
+
+         $identifier = $providedCHO->getLiteral('<http://purl.org/dc/terms/identifier>');
+
+         $this->assertInstanceOf('EasyRdf\Literal', $identifier, "identifier value must be a literal");
+         $this->assertEquals(CocoonSoundRdfMapperTest::TEST_INPUT_ID, $identifier->getValue(), "Value must be equals to ".CocoonSoundRdfMapperTest::TEST_INPUT_ID);
+
+     }
+
+
     /**
      * Test one to one mapping
      *