diff -r e60c55988ed4 -r 7abc74acf392 server/src/tests/libraries/Mergers/CocoonTextRdfMergerTest.php --- a/server/src/tests/libraries/Mergers/CocoonTextRdfMergerTest.php Fri Feb 05 15:08:46 2016 +0100 +++ b/server/src/tests/libraries/Mergers/CocoonTextRdfMergerTest.php Fri Feb 05 17:01:09 2016 +0100 @@ -122,7 +122,7 @@ edm:dataProvider "Laboratoire de langues et civilisations à tradition orale" ; edm:isShownAt ; edm:isShownBy ; - edm:rights ; + edm:rights ; edm:hasView , . @@ -423,6 +423,30 @@ } } + public function testRightDifferent() { + $resGraph = $this->resGraph["SOUND_TEXT"]; + + $aggregationRes = $resGraph->get('ore:Aggregation', '^rdf:type'); + + $license = $aggregationRes->get(''); + + $this->assertNotNull($license, "The licence must not be null"); + $this->assertInstanceOf("EasyRdf\Resource", $license, "Licence must be a resource"); + $this->assertEquals(config('corpusparole.corpus_doc_default_cc_rights'), $license->getUri(), "License must be default licence"); + } + + public function testRightSame() { + $resGraph = $this->resGraph["SOUND_NO_MOD_TEXT"]; + + $aggregationRes = $resGraph->get('ore:Aggregation', '^rdf:type'); + + $license = $aggregationRes->get(''); + + $this->assertNotNull($license, "The licence must not be null"); + $this->assertInstanceOf("EasyRdf\Resource", $license, "Licence must be a resource"); + $this->assertEquals('http://creativecommons.org/licenses/by-nc-sa/4.0/', $license->getUri(), "License must be default licence"); + } + }