Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also support filtering using --filter, --exclude-filter, --group, and…
… --exclude-group when listing groups using --list-groups
- Loading branch information
1 parent
6c16485
commit 43c6126
Showing
7 changed files
with
114 additions
and
44 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
19 changes: 19 additions & 0 deletions
19
tests/end-to-end/cli/listing-tests-and-groups/list-groups-exclude-filter.phpt
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,19 @@ | ||
--TEST-- | ||
phpunit --exclude-filter testOne --list-groups ../../_files/listing-tests-and-groups | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--exclude-filter'; | ||
$_SERVER['argv'][] = 'testOne'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/listing-tests-and-groups'; | ||
|
||
require_once __DIR__ . '/../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Available test group(s): | ||
- two |
19 changes: 19 additions & 0 deletions
19
tests/end-to-end/cli/listing-tests-and-groups/list-groups-exclude-group.phpt
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,19 @@ | ||
--TEST-- | ||
phpunit --exclude-group one --list-groups ../../_files/listing-tests-and-groups | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--exclude-group'; | ||
$_SERVER['argv'][] = 'one'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/listing-tests-and-groups'; | ||
|
||
require_once __DIR__ . '/../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Available test group(s): | ||
- two |
19 changes: 19 additions & 0 deletions
19
tests/end-to-end/cli/listing-tests-and-groups/list-groups-include-filter.phpt
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,19 @@ | ||
--TEST-- | ||
phpunit --exclude-filter testOne --list-groups ../../_files/listing-tests-and-groups | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--exclude-filter'; | ||
$_SERVER['argv'][] = 'testOne'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/listing-tests-and-groups'; | ||
|
||
require_once __DIR__ . '/../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Available test group(s): | ||
- two |
19 changes: 19 additions & 0 deletions
19
tests/end-to-end/cli/listing-tests-and-groups/list-groups-include-group.phpt
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,19 @@ | ||
--TEST-- | ||
phpunit --group one --list-groups ../../_files/listing-tests-and-groups | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--group'; | ||
$_SERVER['argv'][] = 'one'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/listing-tests-and-groups'; | ||
|
||
require_once __DIR__ . '/../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Available test group(s): | ||
- one |