-
-
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
Showing
28 changed files
with
257 additions
and
285 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../../../../phpunit.xsd" | ||
> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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,36 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <sebastian@phpunit.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\TestFixture\Groups; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
final class FooTest extends TestCase | ||
{ | ||
/** | ||
* @group one | ||
*/ | ||
public function testOne(): void | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
|
||
/** | ||
* @group two | ||
*/ | ||
public function testTwo(): void | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
|
||
public function testThree(): void | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
} |
13 changes: 8 additions & 5 deletions
13
tests/end-to-end/cli/exclude-group.phpt → ...nd-to-end/cli/exclude-group-argument.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 |
---|---|---|
@@ -1,20 +1,23 @@ | ||
--TEST-- | ||
phpunit --exclude-group balanceIsInitiallyZero ../../_files/BankAccountTest.php | ||
phpunit --exclude-group one,two tests/FooTest.php | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--debug'; | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--exclude-group'; | ||
$_SERVER['argv'][] = 'balanceIsInitiallyZero'; | ||
$_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php'; | ||
$_SERVER['argv'][] = 'one,two'; | ||
$_SERVER['argv'][] = __DIR__ . '/../_files/groups/tests/FooTest.php'; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
PHPUnit\TextUI\Command::main(); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
.. 2 / 2 (100%) | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended | ||
|
||
|
||
Time: %s, Memory: %s | ||
|
||
OK (2 tests, 2 assertions) | ||
OK (1 test, 1 assertion) |
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,23 @@ | ||
--TEST-- | ||
phpunit --exclude-group one,two | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--debug'; | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--configuration'; | ||
$_SERVER['argv'][] = __DIR__ . '/../_files/groups'; | ||
$_SERVER['argv'][] = '--exclude-group'; | ||
$_SERVER['argv'][] = 'one,two'; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
PHPUnit\TextUI\Command::main(); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended | ||
|
||
|
||
Time: %s, Memory: %s | ||
|
||
OK (1 test, 1 assertion) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 --filter FooTest tests/FooTest.php | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--debug'; | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-configuration'; | ||
$_SERVER['argv'][] = '--filter'; | ||
$_SERVER['argv'][] = 'FooTest'; | ||
$_SERVER['argv'][] = __DIR__ . '/../_files/groups/tests/FooTest.php'; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
PHPUnit\TextUI\Command::main(); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' ended | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' ended | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended | ||
|
||
|
||
Time: %s, Memory: %s | ||
|
||
OK (3 tests, 3 assertions) |
27 changes: 27 additions & 0 deletions
27
tests/end-to-end/cli/filter-class-match-configuration.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,27 @@ | ||
--TEST-- | ||
phpunit --filter FooTest | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--debug'; | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--configuration'; | ||
$_SERVER['argv'][] = __DIR__ . '/../_files/groups'; | ||
$_SERVER['argv'][] = '--filter'; | ||
$_SERVER['argv'][] = 'FooTest'; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
PHPUnit\TextUI\Command::main(); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' ended | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' ended | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started | ||
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended | ||
|
||
|
||
Time: %s, Memory: %s | ||
|
||
OK (3 tests, 3 assertions) |
7 changes: 4 additions & 3 deletions
7
tests/end-to-end/cli/filter-no-results.phpt → ...nd/cli/filter-class-nomatch-argument.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
17 changes: 17 additions & 0 deletions
17
tests/end-to-end/cli/filter-class-nomatch-configuration.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,17 @@ | ||
--TEST-- | ||
phpunit --filter BarTest | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--debug'; | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--configuration'; | ||
$_SERVER['argv'][] = __DIR__ . '/../_files/groups'; | ||
$_SERVER['argv'][] = '--filter'; | ||
$_SERVER['argv'][] = 'BarTest'; | ||
|
||
require_once __DIR__ . '/../../bootstrap.php'; | ||
PHPUnit\TextUI\Command::main(); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
No tests executed! |
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-classname-and-range-isolation.phpt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-number-isolation.phpt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-only-range-isolation.phpt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-only-regexp-isolation.phpt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-only-string-isolation.phpt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-range-isolation.phpt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/end-to-end/cli/filter-dataprovider-by-regexp-isolation.phpt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.