File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -258,15 +258,6 @@ protected function loadInNamespace(string $class)
258258 {
259259 if (strpos ($ class , '\\' ) === false )
260260 {
261- $ class = 'Config \\' . $ class ;
262- $ filePath = APPPATH . str_replace ('\\' , DIRECTORY_SEPARATOR , $ class ) . '.php ' ;
263- $ filename = $ this ->sanitizeFilename ($ filePath );
264-
265- if (is_file ($ filename ))
266- {
267- return $ filename ;
268- }
269-
270261 return false ;
271262 }
272263
Original file line number Diff line number Diff line change @@ -172,19 +172,9 @@ public function testRemoveNamespace()
172172 $ this ->assertFalse ((bool ) $ this ->loader ->loadClass ('My\App\AutoloaderTest ' ));
173173 }
174174
175- public function testloadClassConfigFound ()
175+ public function testloadClassNonNamespaced ()
176176 {
177- $ this ->loader ->addNamespace ('Config ' , APPPATH . 'Config ' );
178- $ this ->assertSame (
179- APPPATH . 'Config ' . DIRECTORY_SEPARATOR . 'Modules.php ' ,
180- $ this ->loader ->loadClass ('Modules ' )
181- );
182- }
183-
184- public function testloadClassConfigNotFound ()
185- {
186- $ this ->loader ->addNamespace ('Config ' , APPPATH . 'Config ' );
187- $ this ->assertFalse ($ this ->loader ->loadClass ('NotFound ' ));
177+ $ this ->assertFalse ($ this ->loader ->loadClass ('Modules ' ));
188178 }
189179
190180 //--------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments