function test_put_to_network_includes_body() { $fake_request_factory = new FakeRequestFactory(); $fake_request = new FakeHttpRequest(new HttpResponse(200)); $fake_request_factory->register('PUT', "http://example.org/res", $fake_request); $group = new NetworkResource("http://example.org/res"); $group->add_resource_triple("http://example.org/res", "http://example.org/pred", "http://example.org/obj"); $group->request_factory = $fake_request_factory; $group->put_to_network(); $parser = ARC2::getRDFXMLParser(array("bnode_prefix" => "genid", "base" => 'http://example.org/')); $parser->parse('http://example.org/', $fake_request->get_body()); $triples = $parser->getTriples(); $this->assertEquals(1, count($triples)); }
/** * Create a new instance of this class * @param string uri URI of the field/predicate map * @param Credentials credentials the credentials to use for authenticated requests (optional) */ function __construct($uri, $credentials = null) { parent::__construct($uri, $credentials); }
/** * Create a new instance of this class * @param string uri URI of the query profile * @param Credentials credentials the credentials to use for authenticated requests (optional) */ function __construct($uri, $credentials = null, $request_factory = null) { parent::__construct($uri, $credentials, $request_factory); }