Show
Ignore:
Timestamp:
03/10/2008 10:17:15 AM (9 months ago)
Author:
Geert
Message:

Follow-up to 2271. Also, the Unit_Test constructor now accepts multiple parameters, each for every path you want to run tests from.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/unit_test/libraries/Unit_Test.php

    r2271 r2272  
    1818         * Sets the test path(s), runs the tests inside and stores the results. 
    1919         * 
    20          * @param   string|array  test path(s) 
     20         * @param   string(s)  test path(s) 
    2121         * @return  void 
    2222         */ 
    23         public function __construct($paths = NULL) 
     23        public function __construct() 
    2424        { 
    2525                // Normalize all given test paths 
    26                 foreach ((array) $paths as $path) 
     26                foreach (func_get_args() as $path) 
    2727                { 
    2828                        $this->paths[] = str_replace('\\', '/', realpath($path)); 
     
    3939                        { 
    4040                                // Normalize path 
    41                                 $path = str_replace('\\', '/', realpath($path)); 
     41                                $path = str_replace('\\', '/', $path); 
    4242 
    4343                                // Skip files without "_Test" suffix