phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] filemanager/tests benchmark_dav.php, 1.3 test_dav.php


From: powerstat
Subject: [Phpgroupware-cvs] filemanager/tests benchmark_dav.php, 1.3 test_dav.php, 1.2 test.php, 1.3
Date: Thu, 28 Apr 2005 22:45:00 +0200

Update of filemanager/tests

Modified Files:
     Branch: MAIN
            benchmark_dav.php lines: +12 -2
            test_dav.php lines: +37 -21
            test.php lines: +18 -9

Log Message:
Added phpdocs

====================================================
Index: filemanager/tests/benchmark_dav.php
diff -u filemanager/tests/benchmark_dav.php:1.2 
filemanager/tests/benchmark_dav.php:1.3
--- filemanager/tests/benchmark_dav.php:1.2     Thu Dec 30 09:17:57 2004
+++ filemanager/tests/benchmark_dav.php Thu Apr 28 20:45:53 2005
@@ -1,4 +1,13 @@
 <?php
+       /**
+       * Filemanager - test
+       *
+       * @copyright Copyright (C) 2002-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package filemanager
+       * @subpackage test
+       * @version $Id$
+       */


 $phpgw_info["flags"] = array("currentapp" => "filemanager",
@@ -6,6 +15,9 @@
                                 "noappheader" => False,
                                 "enable_vfs_class" => True);

+/**
+ * Include phpgroupware header
+ */
 include("../../header.inc.php");

   function getmicrotime()
@@ -56,6 +68,4 @@
                flush();
        }
        stats($times);
-
-
 ?>

====================================================
Index: filemanager/tests/test_dav.php
diff -u filemanager/tests/test_dav.php:1.1 filemanager/tests/test_dav.php:1.2
--- filemanager/tests/test_dav.php:1.1  Thu Feb  6 22:38:02 2003
+++ filemanager/tests/test_dav.php      Thu Apr 28 20:45:53 2005
@@ -1,4 +1,19 @@
 <?php
+       /**
+       * Filemanager - test
+       *
+       * @copyright Copyright (C) 2002-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package filemanager
+       * @subpackage test
+       * @version $Id$
+       */
+
+/**
+ * Write "ok" to output stream
+ *
+ * @param string $string Header text for the ok
+ */
 function ok($string){
 /*     html_table_row_begin();
        html_table_col_begin();*/
@@ -25,6 +40,9 @@
                                 "noappheader" => False,
                                 "enable_vfs_class" => True);

+/**
+ * Include phpgroupware header
+ */
 include("../../header.inc.php");

 html_text('VFS_DAV tests:');
@@ -43,8 +61,8 @@
 $time1 = time();

 echo ' override locks : ';print_r($phpgw->vfs->override_locks);
-       ###
-       # write test
+
+       // write test

        $phpgw->vfs->cd ();
        $testfile = 'sdhdsjjkldggfsbhgbnirooaqojsdkljajklvagbytoi-test';
@@ -60,7 +78,7 @@
        ok("write");
        }

-#read
+// read
        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->read (array ('string' => $testfile, 'noview' => 
true     ));
        if (!$result==$teststring)
@@ -72,8 +90,8 @@
        ok(" read");
        }

-       ###
-       # ls test
+
+       // ls test

        $result1 = $phpgw->vfs->ls (array ('string' => $testfile        ));

@@ -121,7 +139,7 @@
        {
                ok(" ls : parent self reference");
        }
-# getsize
+// getsize
        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->get_size (array ('string' => $testfile   ));
        $len = strlen($teststring);
@@ -134,7 +152,7 @@
        ok("get_size");
        }

-#filetype
+// filetype
        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->file_type(array ('string' => $testfile   ));
        $len = strlen($teststring);
@@ -148,7 +166,7 @@
        }


-#file_exists
+// file_exists
        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->file_exists(array ('string' => $testfile ));
        if (!$result)
@@ -160,7 +178,7 @@
        ok("file_exists");
        }

-#lock
+// lock
        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->lock (array ('string' => $testfile       ));
        if (!$result)
@@ -215,8 +233,8 @@
        {
        ok("lock: after lock override write succeeds");
        }
-###
-# unlock test
+
+// unlock test

        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->unlock (array ('string' => $testfile     ), 
$token);
@@ -229,7 +247,7 @@
                OK("unlock");
        }

-#server side copy
+// server side copy

        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->cp(array ('from' => $testfile,
@@ -278,7 +296,7 @@
                ok("server-side copy : delete target");
        }

-#remote -> local copy
+// remote -> local copy
        $phpgw->vfs->cd ();
        echo "<pre>";
        $result = $phpgw->vfs->cp(array ('from' => $testfile,
@@ -336,7 +354,7 @@
                ok("remote->local copy : delete target");
        }

-#move
+// move
        $phpgw->vfs->cd ();
        echo "<pre>";
        $result = $phpgw->vfs->mv(array ('from' => $testfile,
@@ -402,7 +420,7 @@
                ok("server-side move : move back");
        }

-#remote->local move
+// remote->local move
        echo "<pre>";
        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->mv(array ('from' => $testfile,
@@ -469,8 +487,7 @@
        }


-###
-# delete test
+// delete test

        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->delete(array ('string' => $testfile      ));
@@ -483,8 +500,7 @@
                ok("delete");
        }

-###
-# mkdir test
+// mkdir test

        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->mkdir(array ('string' => $testfile       ));
@@ -509,8 +525,8 @@
        {
        ok("mkdir : write into dir");
        }
-###
-# rm dir test
+
+// rm dir test

        $phpgw->vfs->cd ();
        $result = $phpgw->vfs->rm(array ('string' => $testfile  ));

====================================================
Index: filemanager/tests/test.php
diff -u filemanager/tests/test.php:1.2 filemanager/tests/test.php:1.3
--- filemanager/tests/test.php:1.2      Thu Dec 30 09:17:57 2004
+++ filemanager/tests/test.php  Thu Apr 28 20:45:53 2005
@@ -1,10 +1,22 @@
 <?php
+       /**
+       * Filemanager - test
+       *
+       * @copyright Copyright (C) 2002-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package filemanager
+       * @subpackage test
+       * @version $Id$
+       */

 $phpgw_info["flags"] = array("currentapp" => "filemanager",
                                 "noheader" => False,
                                 "noappheader" => False,
                                 "enable_vfs_class" => True);

+/**
+ * Include phpgroupware header
+ */
 include("../../header.inc.php");

 /*
@@ -24,8 +36,7 @@
 $filesdir = $phpgw->vfs->basedir;
 $currentapp = $phpgw_info["flags"]["currentapp"];

-###
-# start of getabsolutepath tests
+// start of getabsolutepath tests

 $sequence_num = 1;
 $phpgw->vfs->cd ();
@@ -232,11 +243,10 @@
        }
 }

-# end of getabsolutepath tests
-###
+// end of getabsolutepath tests

-###
-# start of path_parts tests
+
+// start of path_parts tests

 /* Just for convienience
 $io = array ("" => array ("fake_full_path" => "", "fake_leading_dirs" => "", 
"fake_extra_path" => "", "fake_name" => "", "real_full_path" => "", 
"real_leading_dirs" => "", "real_extra_path" => "", "real_name" => ""));
@@ -267,8 +277,8 @@
        }
 }

-# end of path_parts tests
-###
+// end of path_parts tests
+

 $phpgw->vfs->cd ();

@@ -276,5 +286,4 @@
 html_text_bold ("The less output, the better.  Please file errors as a " . 
html_link ("https://sourceforge.net/tracker/?group_id=7305&atid=107305";, "bug 
report", True, False) .  ". Be sure to include the system information line at 
the top, and anything special about your setup.  Thanks!");

 html_page_close ();
-
 ?>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]