function CoderReviewUpgrade6xTest::testUpgrade6xDatabase in Coder 7.2
Same name and namespace in other branches
- 7 coder_review/tests/coder_review_6x.test \CoderReviewUpgrade6xTest::testUpgrade6xDatabase()
???
File
- coder_review/
tests/ coder_review_6x.test, line 121
Class
Code
function testUpgrade6xDatabase() {
$this
->assertCoderReviewFail(" function mymodule_install() {\n \$type = \$GLOBALS['db_type'];\n}");
$this
->assertCoderReviewFail(" function mymodule_uninstall() {\n \$type = \$GLOBALS['db_type'];\n}");
$this
->assertCoderReviewFail(" function mymodule_update_1() {\n \$type = \$GLOBALS['db_type'];\n}");
$this
->assertCoderReviewFail(' db_next_id();');
$this
->assertCoderReviewFail(' db_num_rows();');
$this
->assertCoderReviewFail(' db_result($result, $row);');
$this
->assertCoderReviewPass(' db_result($result);');
$this
->assertCoderReviewPass(' $number = db_result(db_query("SELECT COUNT(*) FROM {flood} WHERE event = \'%s\' AND hostname = \'%s\' AND timestamp > %d", $name, ip_address(), REQUEST_TIME - 3600));');
$this
->assertCoderReviewFail(' $sql = "CREATE TABLE foo ()";');
$this
->assertCoderReviewFail(' $sql = "DROP TABLE foo";');
$this
->assertCoderReviewFail(' $sql = "ALTER TABLE foo";');
}