Ejemplo n.º 1
0
 public function testAddLiteralToSequence()
 {
     $testSubject = 'http://some/subject/s1';
     $testObject1 = 'foo1';
     $testObject2 = 'foo2';
     $graph = new ExtendedGraph();
     $graph->add_literal_to_sequence($testSubject, $testObject1);
     $objects = $graph->get_sequence_values('http://some/subject/s1');
     $this->assertEquals(array($testObject1), $objects);
     $graph->add_literal_to_sequence($testSubject, $testObject2);
     $objects = $graph->get_sequence_values('http://some/subject/s1');
     $this->assertEquals(array($testObject1, $testObject2), $objects);
     $graph->add_literal_to_sequence('http://some/other/subject', 'bar');
     $objects = $graph->get_sequence_values('http://some/subject/s1');
     $this->assertEquals(array($testObject1, $testObject2), $objects);
     $objects = $graph->get_sequence_values('http://some/other/subject');
     $this->assertEquals(array('bar'), $objects);
 }