function SchemaTestCase::tryInsert
2 calls to SchemaTestCase::tryInsert()
- SchemaTestCase::testSchema in drupal-7.x/
modules/ simpletest/ tests/ schema.test - SchemaTestCase::testSchema in drupal-7.x/
modules/ simpletest/ tests/ schema.test
Archivo
- drupal-7.x/
modules/ simpletest/ tests/ schema.test, line 140 - Tests for the Database Schema API.
Class
- SchemaTestCase
- Unit tests for the Schema API.
Código
function tryInsert($table = 'test_table') {
try {
db_insert($table)->fields(array('id' => mt_rand(10, 20)))->execute();
return TRUE;
}
catch (Exception $e) {
return FALSE;
}
}