Exemplo n.º 1
0
 function testExportRequestWithParamsUrlEncodesParamValues()
 {
     $R = new Request(array('path' => '/handler', 'params' => array('foo' => 'bar', 'goo[]' => 'jazz', 'good' => 'bad=')));
     $expected = 'foo=bar&' . urlencode('goo[]') . '=jazz&good=bad' . urlencode('=');
     $str = $R->export();
     $this->assertStringStartsWith("GET /handler?{$expected} HTTP/1.1\r\n", $str, $str);
 }