add_courses_to_sessions_functions.lib.test.php 841 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. require_once(api_get_path(LIBRARY_PATH).'add_courses_to_session_functions.lib.php');
  3. class TestAddCoursesToSessionFunctions extends UnitTestCase{
  4. public function __construct(){
  5. $this->UnitTestCase('Courses-sessions library - main/inc/lib/add_courses_to_sessions_functions.lib.test.php');
  6. }
  7. public function setUp(){
  8. $this->TestAddCoursesToSessionFunctions = new AddCourseToSession();
  9. }
  10. public function tearDown(){
  11. $this->TestAddCoursesToSessionFunctions = null;
  12. }
  13. public function TestSearchCourses(){
  14. global $_courses;
  15. global $tbl_course, $tbl_session_rel_course, $id_session;
  16. $needle = '';
  17. $type = '';
  18. $res = AddCourseToSession::search_courses($needle, $type);
  19. $this->assertTrue($res);
  20. $this->assertTrue(is_object($res));
  21. $this->assertFalse(is_null($res));
  22. //var_dump($res);
  23. }
  24. }
  25. ?>