-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e8a5ae
commit a0d23d0
Showing
7 changed files
with
149 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--TEST-- | ||
phpunit --exclude-filter one tests/FooTest.php | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$traceFile = tempnam(sys_get_temp_dir(), __FILE__); | ||
|
||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--no-output'; | ||
$_SERVER['argv'][] = '--log-events-text'; | ||
$_SERVER['argv'][] = $traceFile; | ||
$_SERVER['argv'][] = '--exclude-filter'; | ||
$_SERVER['argv'][] = 'testone'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/groups/tests/FooTest.php'; | ||
|
||
require_once __DIR__ . '/../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
|
||
print file_get_contents($traceFile); | ||
|
||
unlink($traceFile); | ||
--EXPECTF-- | ||
PHPUnit Started (PHPUnit %s using %s) | ||
Test Runner Configured | ||
Test Suite Loaded (3 tests) | ||
Event Facade Sealed | ||
Test Runner Started | ||
Test Suite Sorted | ||
Test Suite Filtered (3 tests) | ||
Test Runner Execution Started (3 tests) | ||
Test Suite Started (PHPUnit\TestFixture\Groups\FooTest, 3 tests) | ||
Test Preparation Started (PHPUnit\TestFixture\Groups\FooTest::testOne) | ||
Test Prepared (PHPUnit\TestFixture\Groups\FooTest::testOne) | ||
Test Passed (PHPUnit\TestFixture\Groups\FooTest::testOne) | ||
Test Finished (PHPUnit\TestFixture\Groups\FooTest::testOne) | ||
Test Preparation Started (PHPUnit\TestFixture\Groups\FooTest::testTwo) | ||
Test Prepared (PHPUnit\TestFixture\Groups\FooTest::testTwo) | ||
Test Passed (PHPUnit\TestFixture\Groups\FooTest::testTwo) | ||
Test Finished (PHPUnit\TestFixture\Groups\FooTest::testTwo) | ||
Test Preparation Started (PHPUnit\TestFixture\Groups\FooTest::testThree) | ||
Test Prepared (PHPUnit\TestFixture\Groups\FooTest::testThree) | ||
Test Passed (PHPUnit\TestFixture\Groups\FooTest::testThree) | ||
Test Finished (PHPUnit\TestFixture\Groups\FooTest::testThree) | ||
Test Suite Finished (PHPUnit\TestFixture\Groups\FooTest, 3 tests) | ||
Test Runner Execution Finished | ||
Test Runner Finished | ||
PHPUnit Finished (Shell Exit Code: 0) |
20 changes: 20 additions & 0 deletions
20
tests/end-to-end/cli/group/failure/list-groups-and-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,20 @@ | ||
--TEST-- | ||
phpunit --list-groups --exclude-filter name | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = '--exclude-filter'; | ||
$_SERVER['argv'][] = 'name'; | ||
|
||
require_once __DIR__ . '/../../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
The --exclude-filter and --list-groups options cannot be combined, --exclude-filter is ignored | ||
|
||
Available test group(s): | ||
|
20 changes: 20 additions & 0 deletions
20
tests/end-to-end/cli/group/failure/list-groups-and-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,20 @@ | ||
--TEST-- | ||
phpunit --list-groups --exclude-group name | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = '--exclude-group'; | ||
$_SERVER['argv'][] = 'name'; | ||
|
||
require_once __DIR__ . '/../../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
The --exclude-group and --list-groups options cannot be combined, --exclude-group is ignored | ||
|
||
Available test group(s): | ||
|
20 changes: 20 additions & 0 deletions
20
tests/end-to-end/cli/group/failure/list-groups-and-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,20 @@ | ||
--TEST-- | ||
phpunit --list-groups --filter name | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = '--filter'; | ||
$_SERVER['argv'][] = 'name'; | ||
|
||
require_once __DIR__ . '/../../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
The --filter and --list-groups options cannot be combined, --filter is ignored | ||
|
||
Available test group(s): | ||
|
20 changes: 20 additions & 0 deletions
20
tests/end-to-end/cli/group/failure/list-groups-and-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,20 @@ | ||
--TEST-- | ||
phpunit --list-groups --group name | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = '--group'; | ||
$_SERVER['argv'][] = 'name'; | ||
|
||
require_once __DIR__ . '/../../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
The --group and --list-groups options cannot be combined, --group is ignored | ||
|
||
Available test group(s): | ||
|
20 changes: 20 additions & 0 deletions
20
tests/end-to-end/cli/group/failure/list-groups-and-testsuite.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,20 @@ | ||
--TEST-- | ||
phpunit --list-groups --testsuite name | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--list-groups'; | ||
$_SERVER['argv'][] = '--testsuite'; | ||
$_SERVER['argv'][] = 'name'; | ||
|
||
require_once __DIR__ . '/../../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
The --testsuite and --list-groups options cannot be combined, --testsuite is ignored | ||
|
||
Available test group(s): | ||
|