Пример #1
0
 public function testReplaceResourceTriples()
 {
     $graph = new ExtendedGraph();
     $graph->add_literal_triple('http://some/subject/1', 'http://some/predicate', 'some object');
     $graph->add_resource_triple('http://some/subject/2', 'http://some/predicate', 'http://some/subject/1');
     $graph->replace_resource_triples('http://some/subject/2', 'http://some/predicate', 'http://some/subject/3');
     $index = $graph->get_index();
     $this->assertEquals('http://some/subject/3', $index['http://some/subject/2']['http://some/predicate'][0]['value'], "http://some/subject/3");
 }