install_upgrade.lib.test.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. class TestInstallUpgrade extends UnitTestCase{
  3. public function TestInstallUpgrade() {
  4. $this->UnitTestCase('testing the function used by '.
  5. 'the install and upgrade scripts');
  6. }
  7. public function testSetFileFolderPermissions() {
  8. $res = set_file_folder_permissions();
  9. $this->assertTrue(is_null($res));
  10. $this->assertNull($res);
  11. //var_dump($res);
  12. }
  13. /*public function testWriteCoursesHtaccessFile() {
  14. $chamilo_path_folder = api_get_path(SYS_PATH);
  15. $url_append=$chamilo_path_folder.'main/install/';
  16. $res = write_courses_htaccess_file($url_append);
  17. if(is_bool($res)){
  18. $this->assertTrue(is_bool($res));
  19. $this->assertTrue($res === true || $res === false);
  20. }else
  21. $this->assertEqual($chamilo_path_folder.'main/install/',$res);
  22. //var_dump($res);
  23. }*/
  24. public function testSplitSqlFile() {
  25. $ret='';
  26. $sql='';
  27. $res = split_sql_file($ret, $sql);
  28. $this->assertTrue($res);
  29. $this->assertTrue(is_bool($res));
  30. $this->assertTrue($res===true);
  31. }
  32. public function testMyDirectoryToArray() {
  33. $chamilo_path_folder= api_get_path(SYS_PATH);
  34. $directory= $chamilo_path_folder.'home';
  35. $res = my_directory_to_array($directory);
  36. $this->assertTrue(is_array($res));
  37. }
  38. /*
  39. public function testDeleteCourse() {
  40. global $cidReq;
  41. $resu = CourseManager::delete_course($cidReq);
  42. session_destroy();
  43. }*/
  44. }
  45. ?>