You are here

function CoderSQLTest::testSQLLowerCaseKeywords in Coder 6.2

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

File

tests/coder_sql.test, line 23

Class

CoderSQLTest

Code

function testSQLLowerCaseKeywords() {
  $this
    ->assertCoderFail('  $sql = "select * from {node}";');
  $this
    ->assertCoderFail('  $sql = "insert into {node} (changed) VALUES (%d)";');
  $this
    ->assertCoderFail('  $sql = "delete from {node}";');
  $this
    ->assertCoderFail('  $sql = "update {node} set changed = now()";');
  $this
    ->assertCoderFail('  $var = t("select something from this");');
  $this
    ->assertCoderPass('  $var = t("update something");');
  $this
    ->assertCoderPass('  $var = t("insert something");');
  $this
    ->assertCoderPass('  $var = t("delete something");');
}