Source

						public function testToArray() {
		$expected = array(
			'method' => 'GET',
			'query' => array(),
			'headers' => array(
				'Host' => 'localhost',
				'Connection' => 'Close',
				'User-Agent' => 'Mozilla/5.0'
			),
			'cookies' => array(),
			'protocol' => 'HTTP/1.1',
			'version' => '1.1',
			'body' => array(),
			'scheme' => 'http',
			'host' => 'localhost',
			'port' => null,
			'path' => '/',
			'auth' => null,
			'username' => null,
			'password' => null
		);
		$result = $this->request->to('array');
		$this->assertEqual($expected, $result);
	}