function DatabaseTestCase::ensureSampleDataNull
Set up tables for NULL handling.
6 calls to DatabaseTestCase::ensureSampleDataNull()
- DatabaseSelectTestCase::testNotNullCondition in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test that we can find a record without a NULL value.
- DatabaseSelectTestCase::testNotNullCondition in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test that we can find a record without a NULL value.
- DatabaseSelectTestCase::testNullCondition in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test that we can find a record with a NULL value.
- DatabaseSelectTestCase::testNullCondition in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test that we can find a record with a NULL value.
- DatabaseUpdateTestCase::testSimpleNullUpdate in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Confirm updating to NULL.
Archivo
- drupal-7.x/
modules/ simpletest/ tests/ database_test.test, line 58
Class
- DatabaseTestCase
- Base test class for databases.
Código
function ensureSampleDataNull() {
$schema['test_null'] = drupal_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();
}