1.20.x system.test | BackdropRequestSanitizerUnitTestCase::testBackdropRequestSanitizer() |
Tests request sanitation used in early bootstrap.
File
- modules/
system/ tests/ system.test, line 2668 - 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);
}
}
}