Changeset 2305

Show
Ignore:
Timestamp:
03/14/2008 03:27:17 PM (7 months ago)
Author:
Geert
Message:

Added feature to disable Tests from #490

Files:
1 modified

Legend:

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

    r2298 r2305  
    8282                                if ( ! $reflector->isSubclassOf(new ReflectionClass('Unit_Test_Case'))) 
    8383                                        throw new Kohana_Exception('unit_test.test_class_extends', $class); 
     84 
     85                                // Skip disabled Tests 
     86                                if ($reflector->hasProperty('DISABLED')) 
     87                                { 
     88                                        $property = new ReflectionProperty($class, 'DISABLED'); 
     89                                        if ($property->getValue(new $class) === TRUE) 
     90                                                continue; 
     91                                } 
    8492 
    8593                                // Initialize setup and teardown method triggers 
     
    181189         * Magically convert this object to a string. 
    182190         * 
    183          * @return  string 
     191         * @return  string  test report 
    184192         */ 
    185193        public function __toString()