modified GetViewHelper to return urlencoded GET query params

This commit is contained in:
Anton Grebnev
2012-06-04 16:05:26 +04:00
parent 359c712962
commit f6e119d372
2 changed files with 11 additions and 2 deletions

View File

@ -68,5 +68,14 @@ class GetViewHelperTest extends PHPUnit_Framework_TestCase
$result = $this->helper->get(array('b' => 'c', 'c' => array('five' => 'six')));
$this->assertSame('?a[one]=1&a[two]=2&b=c&c[five]=six', $result);
}
public function testGetUrlencode()
{
$_GET['a'] = array('one' => 1, 'two' => 2);
$_GET['b'] = 'a';
$_GET['c'] = array('three' => 'four');
$result = $this->helper->get(array('b' => 'c d e', 'c' => array('five' => 'six seven')));
$this->assertSame('?a[one]=1&a[two]=2&b=c+d+e&c[five]=six+seven', $result);
}
}