_acs-content-repository__image_new (private)

 _acs-content-repository__image_new

Defined in packages/acs-content-repository/tcl/test/content-image-test-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) aa_true aa_true (public) ad_tmpnam ad_tmpnam (public) _acs-content-repository__image_new _acs-content-repository__image_new _acs-content-repository__image_new->aa_log _acs-content-repository__image_new->aa_log_result _acs-content-repository__image_new->aa_run_with_teardown _acs-content-repository__image_new->aa_true _acs-content-repository__image_new->ad_tmpnam

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_run_with_teardown -rollback -test_code {
        # create a cr_folder
        set first_folder_id [db_nextval "acs_object_id_seq"]
        set returned_first_folder_id [content::folder::new  -folder_id $first_folder_id  -name "test_folder_${first_folder_id}"]
        aa_true "Folder created"  {$first_folder_id == $returned_first_folder_id}

        content::folder::register_content_type  -folder_id $first_folder_id  -content_type "image"

        set tmp_filename "$::acs::rootdir/packages/acs-content-repository/tcl/test/test-image-1.jpg"
        set image_item_id_orig [db_nextval  "acs_object_id_seq"]
        set image_name [ad_tmpnam "XXXXXX"]
        set image_item_id [image::new  -item_id $image_item_id_orig  -parent_id $first_folder_id  -name $image_name  -tmp_filename $tmp_filename]

        aa_true "Image Created" {$image_item_id_orig eq $image_item_id}
        aa_true "Image CR Item Exists"  {$image_item_id eq [content::item::get_id  -item_path $image_name  -root_folder_id $first_folder_id]}

    }
}} {
          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" "image_new (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: