File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,31 @@ public function testGetFilenamesFailure(): void
396396 $ this ->assertSame ([], get_filenames (SUPPORTPATH . 'Files/shaker/ ' ));
397397 }
398398
399+ public function testGetFilenamesWithSymlinks (): void
400+ {
401+ $ targetDir = APPPATH . 'Language ' ;
402+ $ linkDir = APPPATH . 'Controllers/Language ' ;
403+ file_exists ($ linkDir ) && unlink ($ linkDir );
404+ symlink ($ targetDir , $ linkDir );
405+
406+ $ targetFile = APPPATH . 'Common.php ' ;
407+ $ linkFile = APPPATH . 'Controllers/Common.php ' ;
408+ file_exists ($ linkFile ) && unlink ($ linkFile );
409+ symlink ($ targetFile , $ linkFile );
410+
411+ $ this ->assertSame ([
412+ 0 => 'BaseController.php ' ,
413+ 1 => 'Common.php ' ,
414+ 2 => 'Home.php ' ,
415+ 3 => 'Language ' ,
416+ 4 => 'Validation.php ' ,
417+ 5 => 'en ' ,
418+ ], get_filenames (APPPATH . 'Controllers ' ));
419+
420+ unlink ($ linkDir );
421+ unlink ($ linkFile );
422+ }
423+
399424 public function testGetDirFileInfo (): void
400425 {
401426 $ file = SUPPORTPATH . 'Files/baker/banana.php ' ;
You can’t perform that action at this time.
0 commit comments