You are here

function CoderSQLTest::testSQLBackTick in Coder 6

Same name and namespace in other branches
  1. 6.2 tests/coder_sql.test \CoderSQLTest::testSQLBackTick()

File

tests/coder_sql.test, line 37

Class

CoderSQLTest

Code

function testSQLBackTick() {
  $this
    ->assertCoderFail('  $sql = "SELECT * FROM {node} WHERE title=`abc`";');
  $this
    ->assertCoderFail('  $sql = "INSERT INTO {foo} (nid, title) VALUES (\'1\', `abc`)";');
  $this
    ->assertCoderFail('  $sql = "INSERT INTO {foo} VALUES (\'1\', `abc`)";');
  $this
    ->assertCoderFail('  $sql = "UPDATE {foo} SET nid=\'1\', title=`abc`";');
  $this
    ->assertCoderFail('  $sql = "DELETE FROM {foo} WHERE nid=\'1\' AND title=`abc`";');
}