Skip to content

Commit

Permalink
adds test for getQuery(null)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkingmedia committed Feb 22, 2017
1 parent 20ca839 commit 72a2bb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/TestCase/Http/ServerRequestTest.php
Expand Up @@ -2421,6 +2421,14 @@ public function testGetQuery()
];
$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'));
Expand Down

0 comments on commit 72a2bb1

Please sign in to comment.