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/exercice/freeanswer.class.test.php

29 lines
816 B

<?php
class TestFreeanswer extends UnitTestCase {
/**
* function which redifines Question::createAnswersForm
* @param the formvalidator instance
*/
function testcreateAnswersForm () {
$form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']);
$res =FreeAnswer::createAnswersForm($form);
$this->assertTrue(is_null($res));
//var_dump($res);
}
/**
* abstract function which creates the form to create / edit the answers of the question
* @param the formvalidator instance
*/
function testprocessAnswersCreation () {
$form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']);
$res =FreeAnswer::processAnswersCreation($form);
$this->assertTrue(is_null($res));
//var_dump($res);
}
}
?>