function DrupalGetQueryArrayTestCase::testDrupalGetQueryArray
Tests that drupal_get_query_array() correctly explodes query parameters.
File
-
modules/
simpletest/ tests/ common.test, line 3379
Class
- DrupalGetQueryArrayTestCase
- Tests the functionality of drupal_get_query_array().
Code
public function testDrupalGetQueryArray() {
$url = "http://my.site.com/somepath?foo=/content/folder[@name='foo']/folder[@name='bar']";
$parsed = parse_url($url);
$result = drupal_get_query_array($parsed['query']);
$this->assertEqual($result['foo'], "/content/folder[@name='foo']/folder[@name='bar']", 'drupal_get_query_array() should only explode parameters on the first equals sign.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.