private function CourseObjectCommerceTest::setCourseTestToProduct in Course 3.x
4 calls to CourseObjectCommerceTest::setCourseTestToProduct()
- CourseObjectCommerceTest::testBypassFreeCourses in modules/
course_commerce/ tests/ src/ Functional/ CourseCommerceTest.php - CourseObjectCommerceTest::testDelayedPayment in modules/
course_commerce/ tests/ src/ Functional/ CourseCommerceTest.php - CourseObjectCommerceTest::testRestrictQty in modules/
course_commerce/ tests/ src/ Functional/ CourseCommerceTest.php - CourseObjectCommerceTest::testUbercartEnrollment in modules/
course_commerce/ tests/ src/ Functional/ CourseCommerceTest.php
File
- modules/
course_commerce/ tests/ src/ Functional/ CourseCommerceTest.php, line 52
Class
- CourseObjectCommerceTest
- Test class for Ubercart integration with Course.
Namespace
Drupal\Tests\course_commerce\FunctionalCode
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);
}