Skip to content
Browse files

MDL-29161 weblib: added one more test about un-keyed array params

  • Loading branch information...
1 parent aaa24bb commit 845b165edf11ff5d788740669b3b10b7983765e0 @stronk7 stronk7 committed Feb 27, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/simpletest/testweblib.php
View
5 lib/simpletest/testweblib.php
@@ -117,6 +117,11 @@ function test_moodle_url_round_trip_array_params() {
$url = new moodle_url('http://example.com/?a[1]=1&a[2]=2');
$this->assertEqual($strurl, $url->out(false));
+
+ // For un-keyed array params, we expect 0..n keys to be returned
+ $strurl = 'http://example.com/?a%5B0%5D=0&a%5B1%5D=1';
+ $url = new moodle_url('http://example.com/?a[]=0&a[]=1');
+ $this->assertEqual($strurl, $url->out(false));
}
function test_compare_url() {

0 comments on commit 845b165

Please sign in to comment.
Something went wrong with that request. Please try again.