freeanswer.class.test.php 816 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. class TestFreeanswer extends UnitTestCase {
  3. /**
  4. * function which redifines Question::createAnswersForm
  5. * @param the formvalidator instance
  6. */
  7. function testcreateAnswersForm () {
  8. $form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']);
  9. $res =FreeAnswer::createAnswersForm($form);
  10. $this->assertTrue(is_null($res));
  11. //var_dump($res);
  12. }
  13. /**
  14. * abstract function which creates the form to create / edit the answers of the question
  15. * @param the formvalidator instance
  16. */
  17. function testprocessAnswersCreation () {
  18. $form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']);
  19. $res =FreeAnswer::processAnswersCreation($form);
  20. $this->assertTrue(is_null($res));
  21. //var_dump($res);
  22. }
  23. }
  24. ?>