1 system.test BackdropRequestSanitizerUnitTestCase::testBackdropRequestSanitizer()

Tests request sanitation used in early bootstrap.

File

core/modules/system/tests/system.test, line 2629
Tests for system.module.

Class

BackdropRequestSanitizerUnitTestCase
Tests request sanitation used in early bootstrap.

Code

function testBackdropRequestSanitizer() {
  foreach ($this->testCases as $provider_name => $arguments) {
    foreach ($arguments['setup'] as $global_name => $value) {
      $GLOBALS[$global_name] = $value;
    }
    // Suppress errors so the resulting globals can be checked.
    @_backdrop_bootstrap_sanitize_request();
    foreach ($arguments['expected'] as $global_name => $value) {
      $this->assertEqual($GLOBALS[$global_name], $value);
    }
  }
}