1 | <?php |
||
28 | final class IOResourcePathResolutionTest extends TestCase |
||
29 | { |
||
30 | /** |
||
31 | * @test |
||
32 | * @dataProvider directories_and_files |
||
33 | */ |
||
34 | public function it_should_return_a_finder_instance_with_directory_and_files($pathList, $excludeDir, $excludeFile, $fileCount) |
||
35 | { |
||
36 | $resolver = new IOResourcePathResolution($pathList, $excludeDir, $excludeFile); |
||
37 | |||
38 | $this->assertInstanceOf(IOResourcePathResolution::class, $resolver); |
||
39 | |||
40 | $result = $resolver->__invoke(); |
||
41 | |||
42 | $this->assertCount($fileCount, $result); |
||
43 | } |
||
44 | |||
45 | public function directories_and_files() |
||
46 | { |
||
47 | return [ |
||
48 | [ |
||
49 | [__DIR__ . '/../Helper/FileResolveTest.php'], |
||
50 | [], |
||
51 | [], |
||
52 | 1, |
||
53 | ], |
||
54 | [ |
||
55 | [ |
||
56 | __DIR__ . '/../Helper/', |
||
57 | __DIR__ . '/../Helper/FileResolveTest.php', |
||
58 | ], |
||
59 | [], |
||
60 | [], |
||
61 | 2, |
||
62 | ], |
||
63 | [ |
||
64 | [ |
||
65 | __DIR__ . '/../Helper/', |
||
66 | ], |
||
67 | [], |
||
68 | [], |
||
69 | 1, |
||
70 | ], |
||
71 | [ |
||
72 | [ |
||
73 | __DIR__ . '/../Helper/', |
||
74 | __DIR__ . '/../Helper/FileResolveTest.php', |
||
75 | ], |
||
76 | [ |
||
77 | 'Helper/', |
||
78 | ], |
||
79 | [], |
||
80 | 2, |
||
81 | ], |
||
82 | |||
83 | [ |
||
84 | [ |
||
85 | __DIR__ . '/../Helper/', |
||
86 | ], |
||
87 | [], |
||
88 | [ |
||
89 | 'FileResolveTest.php', |
||
90 | ], |
||
91 | 1, |
||
92 | ], |
||
93 | ]; |
||
94 | } |
||
95 | } |
||
96 |