public function TransactionLegacyAPITest::testTransactionUpdateExisting in Transaction 5
Verify the behavior of pressflow_transaction_update() for existing rows.
File
- tests/
transaction_legacy.test, line 126 - Contains the test for the pressflow_transaction legacy API provided in the transaction module (formerly pressflow_transaction).
Class
- TransactionLegacyAPITest
- Implements the test cases for the pressflow_transaction legacy API.
Code
public function testTransactionUpdateExisting() {
// Next update an existing row and verify by query.
pressflow_transaction_update(self::$table, array(
'first_name',
'last_name',
), array(
'first_name' => 'John',
'last_name' => 'Smith',
'status' => 9,
));
$test = db_result(db_query('SELECT status FROM ' . self::$table . " WHERE first_name = 'John' AND last_name = 'Smith'"));
$msg = t('Updating existing row with pressflow_transaction_update : %s');
$this
->assertEqual($test, 9, $msg);
}