diff -r 93234b0b12f3 -r e550b10fe3ca server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php --- a/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php Fri Feb 12 23:46:15 2016 +0100 +++ b/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php Fri Feb 19 21:18:12 2016 +0100 @@ -241,7 +241,7 @@ } /** - * Test that the web resources + * Test that the web resources has good date * * @return void */ @@ -265,4 +265,27 @@ } + /** + * Test that the web resources as conformsTo property + * + * @return void + */ + public function testWebResourcesConformsTo() { + + $resources = $this->resGraphes['BASE']->allOfType('edm:WebResource'); + foreach ($resources as $wres) { + + $mimetypes = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/format')); + $mimetype = $mimetypes[0]->getValue(); + if($mimetype !== 'application/xml') { + continue; + } + $conformsTo = $wres->get(''); + $this->assertNotNull($conformsTo, "Must have a conformsTo node"); + $this->assertInstanceOf('EasyRdf\Resource', $conformsTo, "Must be a resource"); + $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-dtd_archive", $conformsTo->getUri(), "Must be http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-dtd_archive"); + } + } + + }