public function testToStringWithAuth()
{
$request = new Request(array('auth' => 'Basic', 'username' => 'root', 'password' => 'something'));
$expected = join("\r\n", array('GET / HTTP/1.1', 'Host: localhost', 'Connection: Close', 'User-Agent: Mozilla/5.0', 'Authorization: Basic ' . base64_encode('root:something'), '', ''));
$result = (string) $request;
$this->assertEqual($expected, $result);
}