openoffice_text.class.test.php 1.5 KB

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