1 common.test public BackdropGetQueryArrayTestCase::testBackdropGetQueryArray()

Tests that backdrop_get_query_array() correctly explodes query parameters.

File

core/modules/simpletest/tests/common.test, line 3504
Tests for common.inc functionality.

Class

BackdropGetQueryArrayTestCase
Tests the functionality of backdrop_get_query_array().

Code

public function testBackdropGetQueryArray() {
  $url = "http://my.site.com/some-path?foo=/content/folder[@name='foo']/folder[@name='bar']";
  $parsed = parse_url($url);
  $result = backdrop_get_query_array($parsed['query']);
  $this->assertEqual($result['foo'], "/content/folder[@name='foo']/folder[@name='bar']", 'backdrop_get_query_array() should only explode parameters on the first equals sign.');
}