qti2_export.test.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. //Is possible than this functions are not implemented or some are deprecated, this file will not
  3. //available for the test suite.
  4. class TestQti2Export extends UnitTestCase {
  5. public $qImsAssessmentItem;
  6. public $qImsItem;
  7. public $qImsSection;
  8. public function TestQti2Export() {
  9. $this->UnitTestCase('');
  10. }
  11. public function setUp() {
  12. //$objQuestion = Question::read(1);
  13. $objQuestion = Question::read(1);
  14. $question = new Ims2Question();
  15. /*
  16. $qst = $question->read(1);
  17. if( !$qst or $qst->type == FREE_ANSWER)
  18. {
  19. return '';
  20. }
  21. $question->id = $qst->id;
  22. $question->type = $qst->type;
  23. $question->question = $qst->question;
  24. $question->description = $qst->description;
  25. $question->weighting=$qst->weighting;
  26. $question->position=$qst->position;
  27. $question->picture=$qst->picture;
  28. */
  29. $this->qImsAssessmentItem = new ImsAssessmentItem($question);
  30. //$this->qImsItem = new ImsItem(1);
  31. //$this->qImsSection = new ImsSection(1);
  32. }
  33. public function tearDown() {
  34. $this-> qImsAssessmentItem = null;
  35. $this-> qImsItem = null;
  36. $this-> qImsSection = null;
  37. }
  38. //Class ImsAssessmentItem
  39. /**
  40. * Constructor.
  41. * @param $question The Question object we want to export.
  42. */
  43. /*
  44. function testImsAssessmentItem() {
  45. $question = array();
  46. $res = $this->qImsAssessmentItem->ImsAssessmentItem($question);
  47. if(!is_null){
  48. $this->assertTrue(is_bool($res));
  49. }
  50. var_dump($res);
  51. }
  52. */
  53. function teststart_item() {
  54. /*
  55. $res = $this->qImsAssessmentItem->start_item();
  56. if(!is_null){
  57. $this->assertTrue(is_bool($res));
  58. }
  59. var_dump($res);
  60. */
  61. }
  62. }
  63. ?>