_acs-lang__test_message_register (private)
_acs-lang__test_message_register
Defined in packages/acs-lang/tcl/test/acs-lang-message-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ aa_run_with_teardown -rollback -test_code { set message_key [ad_generate_random_string] set message [ad_generate_random_string] set package_key "acs-translations" set locale "en_US" aa_log "Creating message : $message || message key: $message_key" # Creates the new message lang::message::register $locale $package_key $message_key $message # Try to retrieve the new message created. lang::message::get -package_key $package_key -message_key $message_key -locale $locale -array message_new aa_equals "Message add succeeded" $message_new(message) $message aa_log "Soft-delete the message" lang::message::delete -package_key $package_key -message_key $message_key -locale $locale set key "${package_key}.${message_key}" aa_false "The nsv was deleted" [nsv_exists lang_message_$locale $key] aa_log "Delete the nsv regardless to simulate the behavior after restart" nsv_unset -nocomplain -- lang_message_$locale $key aa_true "Message still exists, flagged as deleted" [db_0or1row check { select 1 from lang_messages where locale = :locale and package_key = :package_key and message_key = :message_key and deleted_p }] # Register the message again lang::message::register $locale $package_key $message_key $message aa_true "Message was reinstated" [db_0or1row check { select 1 from lang_messages where locale = :locale and package_key = :package_key and message_key = :message_key and not deleted_p }] } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "test_message_register (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle