Skip to content
Permalink
Browse files

test the query() method with arrays passed via $_GET

  • Loading branch information...
dereuromark committed Sep 19, 2012
1 parent e8cfac0 commit 60385d1d2837485bae88541a104d5ebbb4b94147
Showing with 21 additions and 0 deletions.
  1. +21 −0 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -1696,6 +1696,27 @@ public function testQuery() {
$this->assertNull($result);
}
/**
* test the query() method with arrays passed via $_GET
*
* @return void
*/
public function testQueryWithArray() {
$_GET = array();
$_GET['test'] = array('foo', 'bar');
$request = new CakeRequest();
$result = $request->query('test');
$this->assertEquals(array('foo', 'bar'), $result);
$result = $request->query('test.1');
$this->assertEquals('bar', $result);
$result = $request->query('test.2');
$this->assertNull($result);
}
/**
* test the data() method reading
*

0 comments on commit 60385d1

Please sign in to comment.
You can’t perform that action at this time.