forked from TomasVotruba/unused-public
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix template discovery, to include root file too (TomasVotruba#127)
- Loading branch information
1 parent
b74eae4
commit 502706d
Showing
6 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
first |
1 change: 1 addition & 0 deletions
1
tests/Templates/TemplateFilesFinder/Fixture/nested/second.file.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
second |
15 changes: 15 additions & 0 deletions
15
tests/Templates/TemplateFilesFinder/TemplateFilesFinderTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace TomasVotruba\UnusedPublic\Tests\Templates\TemplateFilesFinder; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use TomasVotruba\UnusedPublic\Finder\TemplateFilesFinder; | ||
|
||
final class TemplateFilesFinderTest extends TestCase | ||
{ | ||
public function test(): void | ||
{ | ||
$twigFilePaths = TemplateFilesFinder::findTemplateFilePaths([__DIR__ . '/Fixture'], 'twig'); | ||
$this->assertCount(2, $twigFilePaths); | ||
} | ||
} |