Пример #1
0
 public function testFromGraph()
 {
     $itemUri = 'http://foo/item';
     $mainResourceUri = 'http://foo/mainResource';
     $partOfResourceUri = 'http://foo/partOfResource';
     $itemGraph = new ExtendedGraph();
     $itemGraph->add_resource_triple($itemUri, ExtendedGraph::rdf . 'type', self::ONT_resource . 'Item');
     $itemGraph->add_resource_triple($itemUri, self::ONT_resource . 'resource', $mainResourceUri);
     $graph = new ExtendedGraph();
     $graph->from_graph($itemGraph);
     $this->assertTrue($graph->is_equal_to($itemGraph));
 }