-
-
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
356fdfd
commit b6bcafe
Showing
3 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--TEST-- | ||
The right events are emitted in the right order when duplicated CLI options are used | ||
--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'][] = '--filter'; | ||
$_SERVER['argv'][] = 'foo'; | ||
$_SERVER['argv'][] = '--filter'; | ||
$_SERVER['argv'][] = 'bar'; | ||
$_SERVER['argv'][] = '--filter'; | ||
$_SERVER['argv'][] = 'baz'; | ||
$_SERVER['argv'][] = __DIR__ . '/_files/SuccessTest.php'; | ||
|
||
require __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 Triggered Warning (Option --filter cannot be used more than once) | ||
Test Runner Configured | ||
Test Suite Loaded (1 test) | ||
Event Facade Sealed | ||
Test Runner Started | ||
Test Suite Sorted | ||
Test Suite Filtered (0 tests) | ||
Test Runner Execution Started (0 tests) | ||
Test Runner Execution Finished | ||
Test Runner Finished | ||
PHPUnit Finished (Shell Exit Code: 1) |