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