openoffice_text.class.test.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. require_once(api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php');
  3. require_once(api_get_path(SYS_CODE_PATH).'newscorm/openoffice_text.class.php');
  4. class TestOpenOfficeTextClass extends UnitTestCase
  5. {
  6. public function testOpenOfficeText()
  7. {
  8. //ob_start();
  9. $res = OpenofficeText::make_lp($files = array());
  10. $this->assertTrue(is_bool($res));
  11. //ob_end_clean();
  12. //var_dump($res);
  13. }
  14. /*
  15. public function testDealPerChapter() {
  16. //ob_start();
  17. $obj = new OpenofficeText($split_steps=false, $course_code=null, $resource_id=null,$user_id=null);
  18. $res = $obj->dealPerChapter($header = 'Header', $content = 'Content');
  19. $this->assertTrue(is_null($res));
  20. //ob_end_clean();
  21. //var_dump($res);
  22. }
  23. public function testDalPerPage() {
  24. //ob_start();
  25. $obj = new OpenofficeText($split_steps=false, $course_code=null, $resource_id=null,$user_id=null);
  26. $res = $obj->dealPerPage($header = 'Header', $body= 'Body');
  27. $this->assertTrue(is_null($res));
  28. //ob_end_clean();
  29. //var_dump($res);
  30. }
  31. */
  32. public function testAddCommandParameters()
  33. {
  34. //ob_start();
  35. $res = OpenofficeText::add_command_parameters();
  36. $this->assertTrue(is_string($res));
  37. //ob_end_clean();
  38. //var_dump($res);
  39. }
  40. public function testFormatPageContent()
  41. {
  42. //ob_start();
  43. $res = OpenofficeText::format_page_content($header = 'Header', $content = 'Content');
  44. $this->assertTrue(is_string($res));
  45. //ob_end_clean();
  46. //var_dump($res);
  47. }
  48. }
  49. ?>