Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/tests/main/inc/lib/add_course.lib.inc.test.php

30 lines
1.1 KiB

<?php
require_once(api_get_path(LIBRARY_PATH).'add_course.lib.inc.php');
class TestAddCourse extends UnitTestCase {
function TestAddCourse() {
$this->UnitTestCase('Courses creation tests');
}
function testRegisterCourseValue() {
//($courseSysCode, $courseScreenCode, $courseRepository, $courseDbName,
//$titular, $category, $title, $course_language, $uidCreator, $expiration_date = "", $teachers=array())
$course = array(
'courseSysCode'=> 'COD12',
'courseScreenCode' =>'221',
'courseRepository' =>'21',
'courseDbName' =>'ARITM',
'titular' =>'R. Wofgar',
'category' =>'Math',
'title' =>'metodologia de calculo diferencial',
'course_language' =>'English',
'uidCreator'=> '212',
);
$res = register_course($course['courseSysCode'],$course['courseScreenCode'],
$course['courseRepository'],$course['courseDbName'],$course['titular'],
$course['category'],$course['title'],$course['course_language'],
$course['uidCreator'],null,null);
$this->assertPattern('/\d/',$res);
}
}