You are here

function CoderReviewSecurityTest::testSecurityEval in Coder 7.2

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

Tests the functionality to detect the correct use eval() function.

File

coder_review/tests/coder_review_security.test, line 293

Class

CoderReviewSecurityTest
Tests the Coder_review functionality to detect security-related rules.

Code

function testSecurityEval() {
  $this
    ->assertCoderReviewFail('  return drupal_eval($code);');
  $this
    ->assertCoderReviewFail('  print eval($code);');
}