You are here

function CoderReviewSecurityTest::testSecurityCheckPlain in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_review/tests/coder_review_security.test \CoderReviewSecurityTest::testSecurityCheckPlain()

File

coder_review/tests/coder_review_security.test, line 22

Class

CoderReviewSecurityTest

Code

function testSecurityCheckPlain() {
  $this
    ->assertCoderReviewFail('$var = l(check_plain($input), "path/to/drupal");');
  $this
    ->assertCoderReviewFail('$var = l(check_plain($input), "path/to/drupal", array("html" => FALSE);');
  $this
    ->assertCoderReviewFail('$var = l(check_plain($input), "path/to/drupal", array("html" => $value);');
  $this
    ->assertCoderReviewFail('$var = l(check_plain($input), "path/to/drupal", array("html" => 0);');
  $this
    ->assertCoderReviewPass('$var = l(check_plain($input), "path/to/drupal", array("html" => TRUE);');
  $this
    ->assertCoderReviewPass('$var = l(check_plain($input), "path/to/drupal", array(\'html\' => TRUE);');
  $this
    ->assertCoderReviewPass('$var = l(check_plain($input), "path/to/drupal", array("html" => 1);');
  $this
    ->assertCoderReviewPass('$var = l(check_plain($input), "path/to/drupal", array(\'html\' => 1);');
}