parent
6b71eec4a8
commit
2a47c02329
@ -1,29 +1,29 @@ |
|||||||
<?php |
<?php |
||||||
class TestFreeanswer extends UnitTestCase { |
class TestFreeanswer extends UnitTestCase { |
||||||
|
|
||||||
/** |
/** |
||||||
* function which redifines Question::createAnswersForm |
* function which redifines Question::createAnswersForm |
||||||
* @param the formvalidator instance |
* @param the formvalidator instance |
||||||
*/ |
*/ |
||||||
|
|
||||||
function testcreateAnswersForm () { |
function testcreateAnswersForm () { |
||||||
$form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']); |
$form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.intval($_GET['exerciseId'])); |
||||||
$res =FreeAnswer::createAnswersForm($form); |
$res =FreeAnswer::createAnswersForm($form); |
||||||
$this->assertTrue(is_null($res)); |
$this->assertTrue(is_null($res)); |
||||||
//var_dump($res); |
//var_dump($res); |
||||||
} |
} |
||||||
|
|
||||||
/** |
/** |
||||||
* abstract function which creates the form to create / edit the answers of the question |
* abstract function which creates the form to create / edit the answers of the question |
||||||
* @param the formvalidator instance |
* @param the formvalidator instance |
||||||
*/ |
*/ |
||||||
|
|
||||||
function testprocessAnswersCreation () { |
function testprocessAnswersCreation () { |
||||||
$form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']); |
$form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.intval($_GET['exerciseId'])); |
||||||
$res =FreeAnswer::processAnswersCreation($form); |
$res =FreeAnswer::processAnswersCreation($form); |
||||||
$this->assertTrue(is_null($res)); |
$this->assertTrue(is_null($res)); |
||||||
//var_dump($res); |
//var_dump($res); |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
?> |
?> |
||||||
|
Loading…
Reference in new issue