Example #1
0
 /**
  * Tests whether nodes are contained in the graph
  */
 public function testContains()
 {
     $node1 = $this->graph->getNode('http://example.com/node/1');
     $nodeb_0 = $this->graph->getNode('_:b0');
     $this->assertTrue($this->graph->containsNode($node1), 'node1 obj');
     $this->assertTrue($this->graph->containsNode('http://example.com/node/1'), 'node1 IRI');
     $this->assertFalse($this->graph->containsNode('http://example.com/node/X'), 'inexistent IRI');
     $this->assertTrue($this->graph->containsNode($nodeb_0), '_:b0');
     $this->assertFalse($this->graph->containsNode('_:b0'), '_:b0 IRI');
     $this->assertFalse($this->graph->containsNode(new TypedValue('val', 'http://example.com/type')), 'typed value');
 }