function DatabaseTestBase::ensureSampleDataNull in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Database/DatabaseTestBase.php \Drupal\system\Tests\Database\DatabaseTestBase::ensureSampleDataNull()
Sets up tables for NULL handling.
4 calls to DatabaseTestBase::ensureSampleDataNull()
- SelectTest::testIsNotNullCondition in core/
modules/ system/ src/ Tests/ Database/ SelectTest.php - Tests that we can find a record without a NULL value.
- SelectTest::testIsNullCondition in core/
modules/ system/ src/ Tests/ Database/ SelectTest.php - Tests that we can find a record with a NULL value.
- SelectTest::testNullCondition in core/
modules/ system/ src/ Tests/ Database/ SelectTest.php - Tests that a comparison with NULL is always FALSE.
- UpdateTest::testSimpleNullUpdate in core/
modules/ system/ src/ Tests/ Database/ UpdateTest.php - Confirms updating to NULL.
File
- core/
modules/ system/ src/ Tests/ Database/ DatabaseTestBase.php, line 42 - Contains \Drupal\system\Tests\Database\DatabaseTestBase.
Class
- DatabaseTestBase
- Base class for databases database tests.
Namespace
Drupal\system\Tests\DatabaseCode
function ensureSampleDataNull() {
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();
}