--- a/server/src/tests/Repositories/DocumentRepositoryTest.php Sun Oct 09 11:44:18 2016 +0200
+++ b/server/src/tests/Repositories/DocumentRepositoryTest.php Tue Oct 11 02:49:59 2016 +0200
@@ -99,9 +99,14 @@
$mock->title = new EasyRdf\Literal("Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_738", null, "fr");
}),
];
+ $countArray = [
+ m::mock('resObj', function($mock) {
+ $mock->count = new EasyRdf\Literal(1, "http://www.w3.org/2001/XMLSchema#integer", null);
+ }),
+ ];
$sparqlClientMock = m::mock('CorpusParole\Libraries\Sparql\SparqlClient');
- $sparqlClientMock->shouldReceive('query')->andReturn($returnedArray);
+ $sparqlClientMock->shouldReceive('query')->andReturn($countArray, $returnedArray);
$documentRepository = $this->app->make('CorpusParole\Repositories\RdfDocumentRepository', [$sparqlClientMock]);