Permalink
Browse files

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

  • Loading branch information...
1 parent 2f69c61 commit b992ac2eb5c9ab1698d725994412480874559bf9 @stronk7 stronk7 committed Feb 27, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/simpletest/testweblib.php
@@ -122,6 +122,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 b992ac2

Please sign in to comment.