Added option about transactions table truncation in migration scripts - refs BT#4882

skala
Yannick Warnier 12 years ago
parent 88624cc120
commit cc47a54e9f
  1. 11
      tests/migrate/migration.class.php

@ -206,16 +206,19 @@ class Migration {
/**
* Test a series of hand-crafted transactions
* @param array of parameters that would usually get passed to the web service
* @param bool Whether to truncate the transaction table before the test or not
* @return void
*/
function test_transactions($web_service_params) {
function test_transactions($web_service_params, $truncate = false) {
error_log('search_transactions');
//Just for tests
//Cleaning transaction table
$table = Database::get_main_table(TABLE_MIGRATION_TRANSACTION);
$sql = "TRUNCATE $table";
Database::query($sql);
if ($truncate) {
$table = Database::get_main_table(TABLE_MIGRATION_TRANSACTION);
$sql = "TRUNCATE $table";
Database::query($sql);
}
$transaction_harcoded = array(
array(

Loading…
Cancel
Save