|
|
@@ -550,7 +550,7 @@ class HttpSocketTest extends CakeTestCase {
|
|
|
|
|
|
/**
|
|
|
* Test the scheme + port keys
|
|
|
- *
|
|
|
+ *
|
|
|
* @return void
|
|
|
*/
|
|
|
public function testGetWithSchemeAndPort() {
|
|
|
@@ -569,6 +569,26 @@ class HttpSocketTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Test urls like http://cakephp.org/index.php?somestring without key/value pair for query
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testRequestWithStringQuery() {
|
|
|
+ $this->Socket->reset();
|
|
|
+ $request = array(
|
|
|
+ 'uri' => array(
|
|
|
+ 'scheme' => 'http',
|
|
|
+ 'host' => 'cakephp.org',
|
|
|
+ 'path' => 'index.php',
|
|
|
+ 'query' => 'somestring'
|
|
|
+ ),
|
|
|
+ 'method' => 'GET'
|
|
|
+ );
|
|
|
+ $response = $this->Socket->request($request);
|
|
|
+ $this->assertContains("GET /index.php?somestring HTTP/1.1", $this->Socket->request['line']);
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* The "*" asterisk character is only allowed for the following methods: OPTIONS.
|
|
|
*
|
|
|
* @expectedException SocketException
|