File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,21 @@ public function findFiles()
4848 {
4949 $ paths = $ this ->get ('paths ' );
5050 $ exclude = $ this ->get ('exclude ' );
51+ $ workingDir = $ this ->get ('workingDirectory ' );
5152
5253 // Build the finder.
5354 $ files = Finder::create ()
54- ->in ($ this -> get ( ' workingDirectory ' ) )
55+ ->in ($ workingDir )
5556 ->name ($ this ->config ['pattern ' ])
5657 ->files ();
5758
5859 // Include all matching paths.
5960 foreach ($ paths as $ path ) {
61+ // Trim absolute path
62+ if (substr ($ path , 0 , strlen ($ workingDir )) === $ workingDir ) {
63+ $ path = ltrim (substr ($ path , strlen ($ workingDir )), '/ ' );
64+ }
65+
6066 $ files ->path ($ path );
6167 }
6268
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ class StubbedEnvironment extends Environment
3232 /**
3333 * @var TwigTest[]
3434 */
35- protected $ stubTests = [];
35+ protected $ stubTests = [
36+ 'divisible ' => false , // Allow 'divisible by' filter
37+ 'same ' => false , // Allow 'same as' filter
38+ ];
3639
3740 public function __construct ()
3841 {
You can’t perform that action at this time.
0 commit comments