-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#199 Add support for filtering tests by suffix
- Loading branch information
1 parent
bd06bb5
commit e39ac8d
Showing
8 changed files
with
48 additions
and
5 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
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,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Functional\Filter; | ||
|
||
use Paraunit\Filter\Filter; | ||
use Tests\BaseFunctionalTestCase; | ||
|
||
class SuffixFilterTest extends BaseFunctionalTestCase | ||
{ | ||
protected function setup(): void | ||
{ | ||
$this->setOption('configuration', $this->getStubPath() . DIRECTORY_SEPARATOR . 'phpunit_with_2_testsuites.xml'); | ||
$this->setOption('test-suffix', 'GreenTestStub.php'); | ||
|
||
parent::setup(); | ||
} | ||
|
||
public function testFilterTestBySuffixFiles(): void | ||
{ | ||
/** @var Filter $filter */ | ||
$filter = $this->getService(Filter::class); | ||
|
||
$files = $filter->filterTestFiles(); | ||
|
||
$this->assertCount(1, $files); | ||
|
||
$fileExploded = explode('/', $files[0]); | ||
|
||
$this->assertSame('ThreeGreenTestStub.php', end($fileExploded)); | ||
} | ||
} |
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