Skip to content

Commit

Permalink
Merge commit '84dc2fd5a0a5cad6fff99b3d2a088de9e83d9367'
Browse files Browse the repository at this point in the history
  • Loading branch information
coreation committed Aug 17, 2015
2 parents f1442a4 + 84dc2fd commit 082f381
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions app/Tdt/Core/Tests/Api/ModelPagingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,31 @@ private function processDcat()

$total_triples = $parser->parse($graph, $turtle, 'turtle', '');

$datasets = $graph->allOfType('dcat:Dataset');

// Make sure triples are created and inserted into the graph
$this->assertEquals(33, $total_triples);
$this->assertEquals(2, count($datasets));

foreach ($datasets as $dataset) {

$literal_properties = ['dc:title', 'dc:description', 'dc:identifier', 'dc:issued', 'dc:modified'];

foreach ($literal_properties as $property) {

$literal = $dataset->getLiteral($property);

$this->assertNotEmpty($literal);
}

// Get the distribution
$distribution = $dataset->getResource('dcat:distribution');

$this->assertNotEmpty($distribution);
}

// This array will hold 7 entries, one for the Dcat catalog entry itself
// and the two first entries of the definitions it gets from the controller
// their distributions
// and the various license entries
$dcat_array = $graph->toRdfPhp();
$catalog = $graph->allOfType('dcat:Catalog');

$this->assertEquals(7, count($dcat_array));
$this->assertEquals(1, count($catalog));

$this->processLinkHeader($response);
}
Expand Down

0 comments on commit 082f381

Please sign in to comment.