public function RequestSanitizerTest::testRequestSanitization in Drupal 7
Iterate through all the RequestSanitizerTests.
File
- modules/
simpletest/ tests/ request_sanitizer.test, line 43 - Tests for the RequestSanitizer class.
Class
- RequestSanitizerTest
- Tests DrupalRequestSanitizer class.
Code
public function testRequestSanitization() {
foreach ($this
->requestSanitizerTests() as $label => $data) {
$this->errors = array();
// Normalize the test parameters.
$test = array(
'request' => $data[0],
'expected' => isset($data[1]) ? $data[1] : array(),
'expected_errors' => isset($data[2]) ? $data[2] : NULL,
'whitelist' => isset($data[3]) ? $data[3] : array(),
);
$this
->requestSanitizationTest($test['request'], $test['expected'], $test['expected_errors'], $test['whitelist'], $label);
}
}