/** * Assigns the properties of the current Request_Client to another * Request_Client instance - used when setting up a subsequent request. * * @param Request_Client $client */ public function assign_client_properties(Request_Client $client) { $client->cache($this->cache()); $client->follow($this->follow()); $client->follow_headers($this->follow_headers()); $client->header_callbacks($this->header_callbacks()); $client->max_callback_depth($this->max_callback_depth()); $client->callback_params($this->callback_params()); }
/** * Header callback for testing that arbitrary callback_params are available * to the callback. * * @param Request $request * @param Response $response * @param Request_Client $client */ public function callback_assert_params($request, $response, $client) { $this->assertEquals('foo', $client->callback_params('constructor_param')); $this->assertEquals('bar', $client->callback_params('setter_param')); $response->body('assertions_ran'); }