You are here

private function CourseObjectUbercartTestCase::setCourseTestToProduct in Course 8.3

Same name and namespace in other branches
  1. 8.2 modules/course_uc/course_uc.test \CourseObjectUbercartTestCase::setCourseTestToProduct()
  2. 7.2 modules/course_uc/course_uc.test \CourseObjectUbercartTestCase::setCourseTestToProduct()
  3. 7 modules/course_uc/course_uc.test \CourseObjectUbercartTestCase::setCourseTestToProduct()
4 calls to CourseObjectUbercartTestCase::setCourseTestToProduct()
CourseObjectUbercartTestCase::testBypassFreeCourses in modules/course_uc/course_uc.test
CourseObjectUbercartTestCase::testDelayedPayment in modules/course_uc/course_uc.test
CourseObjectUbercartTestCase::testRestrictQty in modules/course_uc/course_uc.test
CourseObjectUbercartTestCase::testUbercartEnrollment in modules/course_uc/course_uc.test

File

modules/course_uc/course_uc.test, line 62

Class

CourseObjectUbercartTestCase
Test class for dealing with adding and removing elements from the course outline.

Code

private function setCourseTestToProduct() {
  module_load_include('inc', 'uc_product', 'uc_product.admin');

  // Mark our course_test content type as a product.
  $form = array();
  $form_state = array();
  $form_state['values']['name'] = 'course_test';
  $form_state['values']['description'] = 'course_test';
  $form_state['values']['pcid'] = 'course_test';
  $form['pcid']['#type'] = '';
  uc_product_class_form_submit($form, $form_state);
}