Browse Source

Fixed unit tests (functions have changed location)

ywarnier 14 years ago
parent
commit
1dca918efe
2 changed files with 18 additions and 26 deletions
  1. 18 0
      tests/main/inc/lib/document.lib.test.php
  2. 0 26
      tests/main/inc/lib/fileUpload.lib.test.php

+ 18 - 0
tests/main/inc/lib/document.lib.test.php

@@ -228,6 +228,24 @@ class TestDocumentManager extends UnitTestCase {
 													  );
 		$this->assertTrue(is_bool($res));
 	}
+    function testdocuments_total_space() {
+        $to_group_id='0';
+        $res= DocumentManager::documents_total_space($to_group_id);
+        if(!is_null($res)):
+        $this->assertTrue(is_numeric($res));
+        endif;
+        //var_dump($res);
+    }
+
+    function testenough_space() {
+        $file_size='';
+        $max_dir_space='';
+        $res= DocumentManager::enough_space($file_size, $max_dir_space);
+        $this->assertTrue(is_bool($res));
+        //var_dump($res);
+    }
+
+    
  //The following function throws exceptions because of SimpleTest, because
  // it declares uncapturable headers
 /*	function teststring_send_for_download() {

+ 0 - 26
tests/main/inc/lib/fileUpload.lib.test.php

@@ -117,32 +117,6 @@ class TestFileUpload extends UnitTestCase {
 
 		//space
 
-		function testdocuments_total_space() {
-			$to_group_id='0';
-			$res= documents_total_space($to_group_id);
-			if(!is_null($res)):
-			$this->assertTrue(is_numeric($res));
-			endif;
-			//var_dump($res);
-		}
-
-		function testenough_size() {
-			$fileSize='';
-			$dir='';
-			$maxDirSpace='';
-			$res= enough_size($fileSize, $dir, $maxDirSpace);
-			$this->assertTrue(is_bool($res));
-			//var_dump($res);
-		}
-
-		function testenough_space() {
-			$file_size='';
-			$max_dir_space='';
-			$res= enough_space($file_size, $max_dir_space);
-			$this->assertTrue(is_bool($res));
-			//var_dump($res);
-		}
-
 		function testDirTotalSpace() {
 			$dirPath= api_get_path(SYS_COURSE_PATH).'document/';
 			$res= dir_total_space($dirPath);