1.20.x database_test.test | DatabaseTestCase::ensureSampleDataNull() |
Set up tables for NULL handling.
File
- modules/
simpletest/ tests/ database_test.test, line 68 - Database tests.
Class
- DatabaseTestCase
- Base test class for databases.
Code
function ensureSampleDataNull() {
$schema['test_null'] = backdrop_get_schema('test_null');
$this->installTables($schema);
db_insert('test_null')
->fields(array('name', 'age'))
->values(array(
'name' => 'Kermit',
'age' => 25,
))
->values(array(
'name' => 'Fozzie',
'age' => NULL,
))
->values(array(
'name' => 'Gonzo',
'age' => 27,
))
->execute();
}