Show
Ignore:
Timestamp:
03/13/2008 01:39:56 AM (10 months ago)
Author:
Geert
Message:

Fix #483

Files:
1 modified

Legend:

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

    r2295 r2298  
    114114                                        $object = new $class; 
    115115 
    116                                         // Run setup method 
    117                                         if ($setup === TRUE) 
    118                                         { 
    119                                                 $object->setup(); 
    120                                         } 
    121  
    122                                         // Run the actual test 
    123116                                        try 
    124117                                        { 
     118                                                // Run setup method 
     119                                                if ($setup === TRUE) 
     120                                                { 
     121                                                        $object->setup(); 
     122                                                } 
     123 
     124                                                // Run the actual test 
    125125                                                $object->$method_name(); 
     126 
     127                                                // Run teardown method 
     128                                                if ($teardown === TRUE) 
     129                                                { 
     130                                                        $object->teardown(); 
     131                                                } 
    126132 
    127133                                                // Test passed 
     
    142148                                        } 
    143149 
    144                                         // Run teardown method 
    145                                         if ($teardown === TRUE) 
    146                                         { 
    147                                                 $object->teardown(); 
    148                                         } 
    149  
    150150                                        // Cleanup 
    151151                                        unset($object);