function CoderSecurityTest::testSecurityCheckPlain in Coder 6
Same name and namespace in other branches
- 6.2 tests/coder_security.test \CoderSecurityTest::testSecurityCheckPlain()
File
- tests/
coder_security.test, line 17
Class
Code
function testSecurityCheckPlain() {
$this
->assertCoderFail('$var = l(check_plain($input), "path/to/drupal");');
$this
->assertCoderFail('$var = l(check_plain($input), "path/to/drupal", array("html" => FALSE);');
$this
->assertCoderFail('$var = l(check_plain($input), "path/to/drupal", array("html" => $value);');
$this
->assertCoderFail('$var = l(check_plain($input), "path/to/drupal", array("html" => 0);');
$this
->assertCoderPass('$var = l(check_plain($input), "path/to/drupal", array("html" => TRUE);');
$this
->assertCoderPass('$var = l(check_plain($input), "path/to/drupal", array(\'html\' => TRUE);');
$this
->assertCoderPass('$var = l(check_plain($input), "path/to/drupal", array("html" => 1);');
$this
->assertCoderPass('$var = l(check_plain($input), "path/to/drupal", array(\'html\' => 1);');
}