public function TransactionTest::testTransactionUpdateNew in Transaction 5
Verify the behavior of transaction_update() for new rows.
File
- tests/
transaction.test, line 109 - Contains the test for the transaction module (formerly pressflow_transaction).
Class
- TransactionTest
- Implements the test cases for the transaction module.
Code
public function testTransactionUpdateNew() {
// First insert a new row and verify by query.
transaction_update(self::$table, 'id', array(
'first_name' => 'Sammy',
'last_name' => 'Davis',
'status' => 1,
));
$test = db_result(db_query('SELECT status FROM ' . self::$table . " WHERE first_name = 'Sammy' AND last_name = 'Davis'"));
$msg = t('Inserting new row with transaction_update : %s');
$this
->assertEqual($test, 1, $msg);
}