_acs-content-repository__content_image (private)

 _acs-content-repository__content_image

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) content::folder::delete content::folder::delete (public) _acs-content-repository__content_image _acs-content-repository__content_image _acs-content-repository__content_image->aa_log _acs-content-repository__content_image->aa_log_result _acs-content-repository__content_image->aa_run_with_teardown _acs-content-repository__content_image->aa_true _acs-content-repository__content_image->content::folder::delete

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"  
        # create a cr_item
        set first_item_id [db_nextval "acs_object_id_seq"]
        set returned_first_item_id [content::item::new  -name "test_item_one"  -item_id $first_item_id  -parent_id $first_folder_id  -content_type "image"  -storage_type "file"]

        aa_true "First item created $first_item_id"  {$first_item_id == $returned_first_item_id}

        # create an image
        set image_id [db_nextval "acs_object_id_seq"]

        set returned_image_id [content::revision::new  -revision_id $image_id  -item_id $first_item_id  -title "Test Title"  -description "Test Description"]
        aa_true "Basic Image created revision_id $image_id returned_revision_id $returned_image_id "  {$image_id == $returned_image_id}

        ::content::item::get_content -revision_id $returned_image_id -array revision_content
        aa_true "Revision contains correct content"  {$revision_content(title) eq "Test Title"
                   && $image_id == $revision_content(revision_id)}

        content::item::delete -item_id $first_item_id

        content::folder::unregister_content_type  -folder_id $first_folder_id  -content_type "image"  
        content::folder::delete -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" "content_image (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: