re-organize test files, make it easy to test for both php 5.2 and 5.3

This commit is contained in:
Sergey Tsalkov
2011-09-23 15:51:35 -07:00
parent 69bfe15ebb
commit f09308a3f7
4 changed files with 125 additions and 123 deletions

View File

@@ -0,0 +1,19 @@
<?
class ErrorTest_53 extends SimpleTest {
function test_1_error_handler() {
global $anonymous_error_callback_worked;
DB::$throw_exception_on_error = false;
DB::$error_handler = function($params) {
global $anonymous_error_callback_worked;
if (substr_count($params['error'], 'You have an error in your SQL syntax')) $anonymous_error_callback_worked = 1;
};
DB::query("SELET * FROM accounts");
$this->assert($anonymous_error_callback_worked === 1);
}
}
?>