You are here

public function QueryParametersToURLUnitTestCase::getTestCases in Query Parameters To URL 7

Returns a list of test cases.

2 calls to QueryParametersToURLUnitTestCase::getTestCases()
QueryParametersToURLUnitTestCase::testQueryParameterValuesDecoding in ./query_parameters_to_url.test
Tests if an encoded query parameter's values is properly decoded.
QueryParametersToURLUnitTestCase::testQueryParameterValuesEncoding in ./query_parameters_to_url.test
Tests if a query parameter's values are properly encoded.

File

./query_parameters_to_url.test, line 326
Query Arguments To URL tests.

Class

QueryParametersToURLUnitTestCase
Class QueryParametersToURLUnitTestCase.

Code

public function getTestCases() {
  $test_cases = array();

  // ?value[a][1][2]=3&value[a][1][6]=7&value[b]=4&value[c]=5
  $test_cases[] = array(
    'parameter_value_array' => array(
      'a' => array(
        1 => array(
          2 => 3,
          6 => 7,
        ),
      ),
      'b' => 4,
      'c' => 5,
    ),
    'encoded_parameter_value_string' => 'a__1__2__3--a__1__6__7--b__4--c__5',
  );

  // ?f[0]=standard_page&f[1]=sm_og_group_ref:node:100
  $test_cases[] = array(
    'parameter_value_array' => array(
      0 => 'standard_page',
      1 => 'sm_og_group_ref:node:100',
    ),
    'encoded_parameter_value_string' => '0__standard_page--1__sm_og_group_ref:node:100',
  );
  return $test_cases;
}