Ticket #477: Unit_Test.php.patch

File Unit_Test.php.patch, 1.0 kB (added by allain, 10 months ago)
  • C:/xampp/htdocs/diomanager2/modules/unit_test/libraries/Unit_Test.php

     
    8484 
    8585                                // Initialize test class results and stats 
    8686                                $this->results[$class] = array(); 
    87                                 $this->stats[$class] = array('passed' => 0, 'failed' => 0); 
     87                                $this->stats[$class] = array('passed' => 0, 'failed' => 0, 'error' => 0); 
    8888 
    8989                                // Loop through all the class methods 
    9090                                foreach ($reflector->getMethods() as $method) 
     
    121121                                                $this->results[$class][$method_name] = $e; 
    122122                                                $this->stats[$class]['failed']++; 
    123123                                        } 
     124                                        catch (Exception $e) 
     125                                        { 
     126                                                // Test failed 
     127                                                $this->results[$class][$method_name] = $e; 
     128                                                $this->stats[$class]['error']++; 
     129                                        } 
    124130 
    125131                                        // Run teardown method 
    126132                                        if ($reflector->hasMethod('teardown'))