public static function _tearDownAfterClass($class) { lucid::log('Tearing down ' . $class); if (is_null($class::$table) === false) { # make sure we returned the existing row to its original state if (is_null($class::$existing_id) === false) { $model = lucid::model($class::$table)->find_one($class::$existing_id); foreach ($class::$original_values as $key => $value) { $model->{$key} = $value; } $model->save(); } # delete the test row inserted by test_controller_save_new() #lucid::model($class::$table)->where($class::$value_column, $class::$insert_value)->delete_many(); } }