1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- class TestExerciseResult extends UnitTestCase
- {
- public $eExerciseResult;
- public function TestExerciseResult() {
- $this->UnitTestCase('');
- }
- public function setUp() {
- $this->eExerciseResult = new ExerciseResult();
- }
- public function tearDown() {
- $this->eExerciseResult = null;
- }
-
- function test_getExercisesReporting() {
- global $user_id;
- $document_path = api_get_path(SYS_COURSE_PATH).'document/';
- $res = $this->eExerciseResult->_getExercisesReporting($document_path,$user_id,$filter=0);
- if(!is_null($res)) {
- $this->assertTrue(is_bool($res));
- }
-
- }
-
- function testexportCompleteReportCSV() {
- global $user_id;
- $document_path = api_get_path(SYS_COURSE_PATH).'document/';
- if(!headers_sent()){
- $res = $this->eExerciseResult->exportCompleteReportCSV($document_path,$user_id, $export_user_fields = array(), $export_filter = 0);
- }
- if(!is_null($res)) {
- $this->assertTrue(is_bool($res));
- }
-
- }
-
- function testexportCompleteReportXLS() {
- global $user_id;
- $document_path = api_get_path(SYS_COURSE_PATH).'document/';
- if(!headers_sent()){
- $res = $this->eExerciseResult->exportCompleteReportXLS($document_path='',$user_id, $export_user_fields=array(), $export_filter = 0);
- }
- if(!is_null($res)) {
- $this->assertTrue(is_bool($res));
- }
-
- }
- }
- ?>
|