| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class LibraryTest extends TestCase |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @dataProvider resourcesDirProvider |
||
| 12 | */ |
||
| 13 | public function testResourcesDir($expected, $projectPath) |
||
| 14 | { |
||
| 15 | $path = __DIR__ . '/fixtures/projects/' . $projectPath; |
||
| 16 | $lib = new Library($path, 'vendor/silverstripe/skynet'); |
||
| 17 | $this->assertEquals($expected, $lib->getResourcesDir()); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function resourcesDirProvider() |
||
| 21 | { |
||
| 22 | return [ |
||
| 23 | ['resources', 'ss43'], |
||
| 24 | ['_resources', 'ss44'], |
||
| 25 | ['customised-resources-dir', 'ss44WithCustomResourcesDir'] |
||
| 26 | ]; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function testInvalidResourceDir() |
||
| 35 | } |
||
| 36 | } |
||
| 37 |