--- a/server/src/tests/Models/DocumentTest.php Wed Jan 20 16:21:40 2016 +0100
+++ b/server/src/tests/Models/DocumentTest.php Wed Jan 20 16:42:20 2016 +0100
@@ -19,7 +19,7 @@
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
- <###h#ttp://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND>
+ <http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND>
a ore:Aggregation ;
edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
edm:provider "Corpus de la Parole"@fr ;
@@ -99,14 +99,14 @@
public function setUp() {
parent::setup();
- $this->graph = new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC);
+ $this->graph = new EasyRdf\Graph("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC);
}
public function testConstructor() {
$this->assertNotNull($this->graph, 'Graph shoud not be null');
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertEquals('crdo-CFPP2000_35_SOUND',$doc->getId(),'Must have the correct id');
}
@@ -114,7 +114,7 @@
public function testTitle() {
$this->assertNotNull($this->graph, 'Graph shoud not be null');
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertEquals("CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e Entretien de Ozgur KILIÇ 2",$doc->getTitle(),'Must have correct title');
$this->assertInstanceOf(EasyRdf\Literal::class, $doc->getTitle(), "Title must be a literal");
@@ -124,7 +124,7 @@
public function testModified() {
$this->assertNotNull($this->graph, 'Graph shoud not be null');
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertInstanceOf(EasyRdf\Literal::class, $doc->getModified(), "Modified must be a literal");
$this->assertEquals("http://purl.org/dc/terms/W3CDTF", $doc->getModified()->getDatatypeURI(), "type must be http://purl.org/dc/terms/W3CDTF");
$this->assertEquals("2013-10-12T14:35:57+02:00", $doc->getModified(), "modified must be 2013-10-12T14:35:57+02:00");
@@ -134,7 +134,7 @@
public function testPublisher() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertCount(1, $doc->getPublishers(), 'Publisher is an array of size 1');
$this->assertInstanceOf('EasyRdf\Resource', $doc->getPublishers()[0], 'publisher is a resource');
@@ -142,7 +142,7 @@
}
public function testMediaArray() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertCount(5, $doc->getMediaArray(), "Media array must be of size 5");
foreach($doc->getMediaArray() as $url => $media) {
@@ -189,7 +189,7 @@
}
public function testGetTypes() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertCount(5, $doc->getTypes(), "types array must be of size 5");
@@ -205,7 +205,7 @@
}
public function testGetOtherTypes() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertCount(2, $doc->getOtherTypes(), "types array must be of size 3");
@@ -221,7 +221,7 @@
}
public function testGetDiscourseTypes() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertCount(3, $doc->getDiscourseTypes(), "types array must be of size 3");
@@ -232,7 +232,7 @@
}
public function testCloneDocument() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$doc2 = clone $doc;
@@ -243,8 +243,8 @@
}
public function testIsIsomorphic() {
- $doc1 = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
- $doc2 = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC));
+ $doc1 = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc2 = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", new EasyRdf\Graph("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC));
$this->assertTrue($doc1->isIsomorphic($doc2),"document must be isomorphic");
@@ -257,7 +257,7 @@
$newDiscourseTypes = ['oratory','dialogue','narrative', 'formulaic', 'ludic'];
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$this->assertCount(3, $doc->getDiscourseTypes(), "types array must be of size 3");
$doc->updateDiscourseTypes($newDiscourseTypes);
@@ -275,7 +275,7 @@
$newDiscourseTypes = ['oratory','dialogue','narrative', 'formulaic', 'ludic'];
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$doc->updateDiscourseTypes($newDiscourseTypes);
@@ -285,8 +285,8 @@
$delta = $doc->getDeltaList()[0];
- $this->assertEquals("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $delta->getDeletedGraph()->getUri(), "uri of deleted graph must be ok");
- $this->assertEquals("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $delta->getAddedGraph()->getUri(), "uri of added graph must be ok");
+ $this->assertEquals("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $delta->getDeletedGraph()->getUri(), "uri of deleted graph must be ok");
+ $this->assertEquals("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $delta->getAddedGraph()->getUri(), "uri of added graph must be ok");
$this->assertEquals(3, $delta->getDeletedGraph()->countTriples(), "deleted graph must have only 3 triples");
$this->assertEquals(5, $delta->getAddedGraph()->countTriples(), "deleted graph must have only 5 triples");
@@ -303,7 +303,7 @@
}
public function testUpdateTitle() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$oldTitle = $doc->getTitle();
@@ -331,16 +331,16 @@
$newDiscourseTypes = ['oratory','dialogue','narrative'];
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$doc->updateDiscourseTypes($newDiscourseTypes);
- $doc2 = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC));
+ $doc2 = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", new EasyRdf\Graph("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC));
$this->assertFalse($doc->isIsomorphic($doc2),"document must not be isomorphic after adding discourse type");
}
public function testGetContributors() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$contributors = $doc->getContributors();
@@ -356,7 +356,7 @@
}
public function testSetContributors() {
- $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+ $doc = new Document("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND", $this->graph);
$contributors = $doc->getContributors();