You are here

private function CourseObjectUbercartTest::setCourseTestToProduct in Course 3.x

4 calls to CourseObjectUbercartTest::setCourseTestToProduct()
CourseObjectUbercartTest::testBypassFreeCourses in modules/course_uc/tests/src/Functional/CourseObjectUbercartTest.php
CourseObjectUbercartTest::testDelayedPayment in modules/course_uc/tests/src/Functional/CourseObjectUbercartTest.php
CourseObjectUbercartTest::testRestrictQty in modules/course_uc/tests/src/Functional/CourseObjectUbercartTest.php
CourseObjectUbercartTest::testUbercartEnrollment in modules/course_uc/tests/src/Functional/CourseObjectUbercartTest.php

File

modules/course_uc/tests/src/Functional/CourseObjectUbercartTest.php, line 52

Class

CourseObjectUbercartTest
Test class for Ubercart integration with Course.

Namespace

Drupal\Tests\course_uc\Functional

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);
}