Пример #1
0
 public function testReplaceLiteralTriples()
 {
     $graph = new ExtendedGraph();
     $graph->add_literal_triple("http://test/1", 'http://www.w3.org/2000/01/rdf-schema#label', "value1");
     $graph->add_literal_triple("http://test/1", 'http://www.w3.org/2000/01/rdf-schema#label', "value2");
     $graph->replace_literal_triples("http://test/1", 'http://www.w3.org/2000/01/rdf-schema#label', "value3");
     $this->assertTrue($graph->has_literal_triple("http://test/1", 'http://www.w3.org/2000/01/rdf-schema#label', "value3"));
     $this->assertFalse($graph->has_literal_triple("http://test/1", 'http://www.w3.org/2000/01/rdf-schema#label', "value1"));
     $this->assertFalse($graph->has_literal_triple("http://test/1", 'http://www.w3.org/2000/01/rdf-schema#label', "value2"));
 }