You are here

function CoderReviewSQLTest::testSQLNotEquals in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_review/tests/coder_review_sql.test \CoderReviewSQLTest::testSQLNotEquals()

Tests functionality to detect correct use of NOT EQUAL in SQL statements.

File

coder_review/tests/coder_review_sql.test, line 84

Class

CoderReviewSQLTest
Tests the Coder_review dectection functionality related to SQL.

Code

function testSQLNotEquals() {
  $this
    ->assertCoderReviewFail('  $sql = "SELECT * FROM {node} WHERE nid != 10";');
  $this
    ->assertCoderReviewPass('  $sql = "SELECT * FROM {node} WHERE nid = 10";');
  $this
    ->assertCoderReviewPass('  $sql = "SELECT * FROM {node} WHERE nid <> 10";');
}