-
-
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
0f800f8
commit 129106b
Showing
11 changed files
with
248 additions
and
10 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
41 changes: 41 additions & 0 deletions
41
tests/end-to-end/cli/group/exclude-group-argument-csv.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,41 @@ | ||
--TEST-- | ||
phpunit --exclude-group one,two 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-group'; | ||
$_SERVER['argv'][] = 'one,two'; | ||
$_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 Triggered Warning (Using comma-separated values with --exclude-group is deprecated and will no longer work in PHPUnit 12) | ||
Test Runner Configured | ||
Test Suite Loaded (3 tests) | ||
Event Facade Sealed | ||
Test Runner Started | ||
Test Suite Sorted | ||
Test Suite Filtered (1 test) | ||
Test Runner Execution Started (1 test) | ||
Test Suite Started (PHPUnit\TestFixture\Groups\FooTest, 1 test) | ||
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, 1 test) | ||
Test Runner Execution Finished | ||
Test Runner Finished | ||
PHPUnit Finished (Shell Exit Code: 1) |
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
45 changes: 45 additions & 0 deletions
45
tests/end-to-end/cli/group/exclude-group-configuration-csv.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,45 @@ | ||
--TEST-- | ||
phpunit --exclude-group one,two | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$traceFile = tempnam(sys_get_temp_dir(), __FILE__); | ||
|
||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-output'; | ||
$_SERVER['argv'][] = '--log-events-text'; | ||
$_SERVER['argv'][] = $traceFile; | ||
$_SERVER['argv'][] = '--configuration'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/groups'; | ||
$_SERVER['argv'][] = '--exclude-group'; | ||
$_SERVER['argv'][] = 'one,two'; | ||
|
||
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 Triggered Warning (Using comma-separated values with --exclude-group is deprecated and will no longer work in PHPUnit 12) | ||
Test Runner Configured | ||
Test Suite Loaded (3 tests) | ||
Event Facade Sealed | ||
Test Runner Started | ||
Test Suite Sorted | ||
Test Suite Filtered (1 test) | ||
Test Runner Execution Started (1 test) | ||
Test Suite Started (%s%etests%eend-to-end%e_files%egroups%ephpunit.xml, 1 test) | ||
Test Suite Started (default, 1 test) | ||
Test Suite Started (PHPUnit\TestFixture\Groups\FooTest, 1 test) | ||
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, 1 test) | ||
Test Suite Finished (default, 1 test) | ||
Test Suite Finished (%s%etests%eend-to-end%e_files%egroups%ephpunit.xml, 1 test) | ||
Test Runner Execution Finished | ||
Test Runner Finished | ||
PHPUnit Finished (Shell Exit Code: 1) |
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,35 @@ | ||
--TEST-- | ||
phpunit --group small,medium,large ../../_files/size-groups/SizeGroupsTest.php | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--group'; | ||
$_SERVER['argv'][] = 'small,medium,large'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/size-groups/SizeGroupsTest.php'; | ||
|
||
require_once __DIR__ . '/../../../bootstrap.php'; | ||
|
||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Runtime: %s | ||
|
||
There were 7 PHPUnit test runner warnings: | ||
|
||
1) Using comma-separated values with --group is deprecated and will no longer work in PHPUnit 12 | ||
|
||
2) Group name "small" is not allowed for method PHPUnit\TestFixture\SizeGroups\SizeGroupsTest::testOne | ||
|
||
3) Group name "medium" is not allowed for method PHPUnit\TestFixture\SizeGroups\SizeGroupsTest::testOne | ||
|
||
4) Group name "large" is not allowed for method PHPUnit\TestFixture\SizeGroups\SizeGroupsTest::testOne | ||
|
||
5) Group name "small" is not allowed for class PHPUnit\TestFixture\SizeGroups\SizeGroupsTest | ||
|
||
6) Group name "medium" is not allowed for class PHPUnit\TestFixture\SizeGroups\SizeGroupsTest | ||
|
||
7) Group name "large" is not allowed for class PHPUnit\TestFixture\SizeGroups\SizeGroupsTest | ||
|
||
No tests executed! |
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,27 @@ | ||
--TEST-- | ||
phpunit --test-suffix .test.php,.my.php ../../_files/ | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--test-suffix'; | ||
$_SERVER['argv'][] = '.test.php,.my.php'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/'; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Runtime: %s | ||
|
||
..... 5 / 5 (100%) | ||
|
||
Time: %s, Memory: %s | ||
|
||
There was 1 PHPUnit test runner warning: | ||
|
||
1) Using comma-separated values with --test-suffix is deprecated and will no longer work in PHPUnit 12 | ||
|
||
WARNINGS! | ||
Tests: 5, Assertions: 5, Warnings: 1. |
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