function DatabaseInsertLOBTestCase::testInsertMultipleBlob in SimpleTest 7
Test that we can insert multiple blob fields in the same query.
File
- tests/
database_test.test, line 586
Class
- DatabaseInsertLOBTestCase
- Insert tests using LOB fields, which are weird on some databases.
Code
function testInsertMultipleBlob() {
$id = db_insert('test_two_blobs')
->fields(array(
'blob1' => 'This is',
'blob2' => 'a test',
))
->execute();
$r = db_query('SELECT * FROM {test_two_blobs} WHERE id = :id', array(
':id' => $id,
))
->fetchAssoc();
$this
->assertTrue($r['blob1'] === 'This is' && $r['blob2'] === 'a test', t('Can insert multiple blobs per row.'));
}