--- a/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php Wed Feb 03 00:40:35 2016 +0100
+++ b/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php Wed Feb 03 18:34:44 2016 +0100
@@ -87,6 +87,7 @@
$this->assertTrue(true);
}
+
/**
* Test that the returned graph has the same uri that the original.
*
@@ -115,6 +116,24 @@
}
/**
+ * 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(CocoonTextRdfMapperTest::TEST_INPUT_ID, $identifier->getValue(), "Value must be equals to ".CocoonTextRdfMapperTest::TEST_INPUT_ID);
+
+ }
+
+ /**
* Test providedCHO uri.
*
* @return void
@@ -126,6 +145,8 @@
$this->assertEquals(CocoonTextRdfMapperTest::TEST_CHO_URI,$resources[0]->getUri());
}
+
+
/**
* Test that the returned graph does not have a http://purl.org/dc/dcmitype/Sound type
*