equal
deleted
inserted
replaced
134 $this->assertCount(1, $docList, "Should have one element"); |
134 $this->assertCount(1, $docList, "Should have one element"); |
135 |
135 |
136 $resDoc = $docList[0]; |
136 $resDoc = $docList[0]; |
137 |
137 |
138 $this->assertInstanceOf(Document::class, $resDoc, "Res doc must be a Document"); |
138 $this->assertInstanceOf(Document::class, $resDoc, "Res doc must be a Document"); |
139 $this->assertEquals('crdo-ALA_738', $resDoc->getId(), "id must be crdo..."); |
139 $this->assertEquals('corpusparole:crdo-ALA_738', $resDoc->getId(), "id must be crdo..."); |
140 $this->assertEquals($expectedId, $resDoc->getUri(), 'url must be ...'); |
140 $this->assertEquals($expectedId, $resDoc->getUri(), 'url must be ...'); |
141 $this->assertNotNull($resDoc->getGraph(), 'Graph must not be null'); |
141 $this->assertNotNull($resDoc->getGraph(), 'Graph must not be null'); |
142 |
142 |
143 } |
143 } |
144 |
144 |
148 $returnedGraph = new EasyRdf\Graph($expectedId, DocumentRepositoryIntegrationTest::TEST_DOC); |
148 $returnedGraph = new EasyRdf\Graph($expectedId, DocumentRepositoryIntegrationTest::TEST_DOC); |
149 |
149 |
150 $res = $this->documentRepository->get('crdo-ALA_738'); |
150 $res = $this->documentRepository->get('crdo-ALA_738'); |
151 |
151 |
152 $this->assertInstanceOf(Document::class, $res, "Result must be of type Document"); |
152 $this->assertInstanceOf(Document::class, $res, "Result must be of type Document"); |
153 $this->assertEquals('crdo-ALA_738', $res->getId(), 'id should be crdo-ALA_738' ); |
153 $this->assertEquals('corpusparole:crdo-ALA_738', $res->getId(), 'id should be crdo-ALA_738' ); |
154 $this->assertNotNull($res->getGraph(), "Graph shoul not be null"); |
154 $this->assertNotNull($res->getGraph(), "Graph shoul not be null"); |
155 $this->assertEquals("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ALA_738",$res->getGraph()->getUri(), "uri of graph must be http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ALA_738"); |
155 $this->assertEquals("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ALA_738",$res->getGraph()->getUri(), "uri of graph must be http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ALA_738"); |
156 $this->assertTrue(EasyRdf\Isomorphic::isomorphic($res->getGraph(),$returnedGraph)); |
156 $this->assertTrue(EasyRdf\Isomorphic::isomorphic($res->getGraph(),$returnedGraph)); |
157 } |
157 } |
158 |
158 |