浏览代码

adds test for getQuery(null)

thinkingmedia 9 年之前
父节点
当前提交
72a2bb11d2
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      tests/TestCase/Http/ServerRequestTest.php

+ 8 - 0
tests/TestCase/Http/ServerRequestTest.php

@@ -2421,6 +2421,14 @@ class ServerRequestTest extends TestCase
         ];
         $request = new ServerRequest($array);
 
+        $this->assertEquals([
+            'foo' => 'bar',
+            'zero' => '0',
+            'test' => [
+                'foo', 'bar'
+            ]
+        ], $request->getQuery());
+
         $this->assertSame('bar', $request->getQuery('foo'));
         $this->assertSame('0', $request->getQuery('zero'));
         $this->assertNull($request->getQuery('imaginary'));