File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -203,12 +203,16 @@ public static function getClassMap()
203203     * Loads a class' file. 
204204     * 
205205     * This is the self function registered as an autoload handler. 
206+      * 
207+      * @return bool 
206208     */ 
207209    public  static  function  loadClass ($ class
208210    {
209211        if  ($ filestatic ::findFileForClass ($ class
210212            includeFile ($ file
213+             return  true ;
211214        }
215+         return  false ;
212216    }
213217
214218    /** 
Original file line number Diff line number Diff line change @@ -24,6 +24,16 @@ public function testAddPsr4()
2424        $ this assertTrue (class_exists ('Foo \\Bar ' ));
2525    }
2626
27+     /** 
28+      * @group psr4 
29+      **/ 
30+     public  function  testLoadClass ()
31+     {
32+         $ this assertFalse (Autoload::loadClass ('Foo \\Bar ' ));
33+         Autoload::addPsr4 ('Foo ' , __DIR__ .'/fixtures/Foo ' );
34+         $ this assertTrue (Autoload::loadClass ('Foo \\Bar ' ));
35+     }
36+ 
2737    /** 
2838     * @group psr4 
2939     **/ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments