public function testGetResources() { $graph = new ExtendedGraph(); $graph->add_literal_triple('http://some/subject/1', 'http://some/predicate/p1', 'some object'); $graph->add_resource_triple('http://some/subject/2', 'http://some/predicate/p2', 'http://some/object/1'); $graph->add_resource_triple('http://some/subject/3', 'http://some/predicate/p3', 'http://some/object/2'); $graph->add_literal_triple('http://some/subject/1', 'http://some/predicate/p3', 'http://this/is/not/a/rsource'); $expected = array('http://some/subject/1', 'http://some/subject/2', 'http://some/subject/3', 'http://some/object/1', 'http://some/object/2'); $actual = $graph->get_resources(); sort($expected); sort($actual); $this->assertEquals(count($expected), count($actual), 'should get same number of resource uris'); $this->assertEquals($expected, $actual, 'should get expected array containing all the resource uris'); }