aa_stub (public)
aa_stub proc_name new_body
Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl
Stubs a function. Provide the procedure name and the new body code.
Either call this function from within a testcase for a testcase specific stub, or outside a testcase for a file-wide stub.
- Parameters:
- proc_name (required)
- new_body (required)
- Author:
- Peter Harper
- Created:
- 24 July 2001
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_admin_check_expired_certificates, auth_password_change, auth_password_recover, auth_password_reset, auth_use_email_for_login_p, auth_email_on_password_change, util__replace_temporary_tags_with_lookups
Source code: if {[info exists ::aa_testcase_id]} { # # Runtime testcase stub. # If a stub for this procedure hasn't already been defined, take a copy # of the original procedure and add it to the ::aa_stub_names list. # if {$proc_name ni $::aa_stub_names} { lappend ::aa_stub_names $proc_name aa_proc_copy $proc_name ${proc_name}_unstubbed } set ::aa_stub_sequence($proc_name) 1 aa_proc_copy $proc_name $proc_name " global aa_stub_sequence global aa_testcase_id set sequence_id \$::aa_stub_sequence\($proc_name\) incr ::aa_stub_sequence\($proc_name\) $new_body " return } else { # # File wide stub. # if {![nsv_exists aa_file_wide_stubs [info script]]} { nsv_set aa_file_wide_stubs [info script] {} } nsv_lappend aa_file_wide_stubs [info script] [list $proc_name $new_body] }XQL Not present: Generic, PostgreSQL, Oracle