File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,21 @@ public function findFiles()
48
48
{
49
49
$ paths = $ this ->get ('paths ' );
50
50
$ exclude = $ this ->get ('exclude ' );
51
+ $ workingDir = $ this ->get ('workingDirectory ' );
51
52
52
53
// Build the finder.
53
54
$ files = Finder::create ()
54
- ->in ($ this -> get ( ' workingDirectory ' ) )
55
+ ->in ($ workingDir )
55
56
->name ($ this ->config ['pattern ' ])
56
57
->files ();
57
58
58
59
// Include all matching paths.
59
60
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
+
60
66
$ files ->path ($ path );
61
67
}
62
68
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ class StubbedEnvironment extends Environment
32
32
/**
33
33
* @var TwigTest[]
34
34
*/
35
- protected $ stubTests = [];
35
+ protected $ stubTests = [
36
+ 'divisible ' => false , // Allow 'divisible by' filter
37
+ 'same ' => false , // Allow 'same as' filter
38
+ ];
36
39
37
40
public function __construct ()
38
41
{
You can’t perform that action at this time.
0 commit comments