You are here

public function QueryParametersToURLTestCase::setUp in Query Parameters To URL 7

Initial setup.

Overrides DrupalWebTestCase::setUp

1 method overrides QueryParametersToURLTestCase::setUp()
QueryParametersToURLGlobalRedirectTestCase::setUp in ./query_parameters_to_url.test
Initial setup.

File

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

Class

QueryParametersToURLTestCase
General test cases.

Code

public function setUp() {
  parent::setUp(array(
    'query_parameters_to_url',
  ));

  // Enable rewriting on all paths.
  variable_set(QUERY_PARAMETERS_TO_URL_PATH_REG_EXP, '{.+}');

  // Clean URLs should be enabled for testing.
  variable_set('clean_url', 1);

  // Create test node just for the sake of something being on the front page.
  $node = array(
    'type' => 'page',
    'title' => 'Test Page Node',
    'path' => array(
      'alias' => 'test-node',
    ),
    'language' => LANGUAGE_NONE,
    'promote' => 1,
  );

  // Save the node.
  $this
    ->drupalCreateNode($node);
}