You are here

protected function RequestSanitizerTest::setUp in Drupal 7

Sets up unit test environment.

Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.

Overrides DrupalUnitTestCase::setUp

File

modules/simpletest/tests/request_sanitizer.test, line 34
Tests for the RequestSanitizer class.

Class

RequestSanitizerTest
Tests DrupalRequestSanitizer class.

Code

protected function setUp() {
  require_once DRUPAL_ROOT . '/includes/request-sanitizer.inc';
  parent::setUp();
  set_error_handler(array(
    $this,
    "sanitizerTestErrorHandler",
  ));
}