Skip to content

Commit

Permalink
Add a zero test for Request::query()
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Sep 9, 2015
1 parent 5c7c7cf commit fe6b32f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/TestCase/Network/RequestTest.php
Expand Up @@ -1932,12 +1932,15 @@ public function testEnvironmentDetection($name, $env, $expected)
public function testQuery()
{
$request = new Request([
'query' => ['foo' => 'bar']
'query' => ['foo' => 'bar', 'zero' => '0']
]);

$result = $request->query('foo');
$this->assertEquals('bar', $result);

$result = $request->query('zero');
$this->assertEquals('0', $result);

$result = $request->query('imaginary');
$this->assertNull($result);
}
Expand Down

0 comments on commit fe6b32f

Please sign in to comment.