diff --git a/tests/main/chat/chat_functions.lib.test.php b/tests/main/chat/chat_functions.lib.test.php new file mode 100644 index 0000000000..60cfe7c3f4 --- /dev/null +++ b/tests/main/chat/chat_functions.lib.test.php @@ -0,0 +1,38 @@ +assertTrue(is_null($res)); + //var_dump($res); + } + + function testexit_of_chat () { + $docu = new MockCourseManager(); + $user_id=1; + $res = exit_of_chat(); + $docu->expectOnce(CourseManager::get_courses_list_by_user_id($user_id),'admin'); + $this->assertTrue(is_object($docu)); + $this->assertTrue(is_null($res)); + //var_dump($res); + } + + function testuser_connected_in_chat () { + $user_id=1; + $database_name=''; + $res = user_connected_in_chat($user_id,$database_name); + $this->assertTrue(is_bool($res)); + //var_dump($res); + } + + function testusers_list_in_chat () { + $res = users_list_in_chat(); + $this->assertTrue(is_array($res)); + //var_dump($res); + } +} +?>