Skip to content

Commit 0da2376

Browse files
Merge branch '8.5' into 9.6
2 parents 1badd7d + f7e7556 commit 0da2376

28 files changed

+257
-285
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../../../../phpunit.xsd"
4+
>
5+
<testsuites>
6+
<testsuite name="default">
7+
<directory>tests</directory>
8+
</testsuite>
9+
</testsuites>
10+
</phpunit>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\TestFixture\Groups;
11+
12+
use PHPUnit\Framework\TestCase;
13+
14+
final class FooTest extends TestCase
15+
{
16+
/**
17+
* @group one
18+
*/
19+
public function testOne(): void
20+
{
21+
$this->assertTrue(true);
22+
}
23+
24+
/**
25+
* @group two
26+
*/
27+
public function testTwo(): void
28+
{
29+
$this->assertTrue(true);
30+
}
31+
32+
public function testThree(): void
33+
{
34+
$this->assertTrue(true);
35+
}
36+
}
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
--TEST--
2-
phpunit --exclude-group balanceIsInitiallyZero ../../_files/BankAccountTest.php
2+
phpunit --exclude-group one,two tests/FooTest.php
33
--FILE--
44
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--debug';
56
$_SERVER['argv'][] = '--do-not-cache-result';
67
$_SERVER['argv'][] = '--no-configuration';
78
$_SERVER['argv'][] = '--exclude-group';
8-
$_SERVER['argv'][] = 'balanceIsInitiallyZero';
9-
$_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php';
9+
$_SERVER['argv'][] = 'one,two';
10+
$_SERVER['argv'][] = __DIR__ . '/../_files/groups/tests/FooTest.php';
1011

1112
require_once __DIR__ . '/../../bootstrap.php';
1213
PHPUnit\TextUI\Command::main();
1314
--EXPECTF--
1415
PHPUnit %s by Sebastian Bergmann and contributors.
1516

16-
.. 2 / 2 (100%)
17+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started
18+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended
19+
1720

1821
Time: %s, Memory: %s
1922

20-
OK (2 tests, 2 assertions)
23+
OK (1 test, 1 assertion)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
phpunit --exclude-group one,two
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--debug';
6+
$_SERVER['argv'][] = '--do-not-cache-result';
7+
$_SERVER['argv'][] = '--configuration';
8+
$_SERVER['argv'][] = __DIR__ . '/../_files/groups';
9+
$_SERVER['argv'][] = '--exclude-group';
10+
$_SERVER['argv'][] = 'one,two';
11+
12+
require_once __DIR__ . '/../../bootstrap.php';
13+
PHPUnit\TextUI\Command::main();
14+
--EXPECTF--
15+
PHPUnit %s by Sebastian Bergmann and contributors.
16+
17+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started
18+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended
19+
20+
21+
Time: %s, Memory: %s
22+
23+
OK (1 test, 1 assertion)

tests/end-to-end/cli/exclude-group-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-class-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
phpunit --filter FooTest tests/FooTest.php
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--debug';
6+
$_SERVER['argv'][] = '--do-not-cache-result';
7+
$_SERVER['argv'][] = '--no-configuration';
8+
$_SERVER['argv'][] = '--filter';
9+
$_SERVER['argv'][] = 'FooTest';
10+
$_SERVER['argv'][] = __DIR__ . '/../_files/groups/tests/FooTest.php';
11+
12+
require_once __DIR__ . '/../../bootstrap.php';
13+
PHPUnit\TextUI\Command::main();
14+
--EXPECTF--
15+
PHPUnit %s by Sebastian Bergmann and contributors.
16+
17+
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' started
18+
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' ended
19+
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' started
20+
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' ended
21+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started
22+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended
23+
24+
25+
Time: %s, Memory: %s
26+
27+
OK (3 tests, 3 assertions)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
phpunit --filter FooTest
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--debug';
6+
$_SERVER['argv'][] = '--do-not-cache-result';
7+
$_SERVER['argv'][] = '--configuration';
8+
$_SERVER['argv'][] = __DIR__ . '/../_files/groups';
9+
$_SERVER['argv'][] = '--filter';
10+
$_SERVER['argv'][] = 'FooTest';
11+
12+
require_once __DIR__ . '/../../bootstrap.php';
13+
PHPUnit\TextUI\Command::main();
14+
--EXPECTF--
15+
PHPUnit %s by Sebastian Bergmann and contributors.
16+
17+
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' started
18+
Test 'PHPUnit\TestFixture\Groups\FooTest::testOne' ended
19+
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' started
20+
Test 'PHPUnit\TestFixture\Groups\FooTest::testTwo' ended
21+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' started
22+
Test 'PHPUnit\TestFixture\Groups\FooTest::testThree' ended
23+
24+
25+
Time: %s, Memory: %s
26+
27+
OK (3 tests, 3 assertions)

tests/end-to-end/cli/filter-no-results.phpt renamed to tests/end-to-end/cli/filter-class-nomatch-argument.phpt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
--TEST--
2-
phpunit --filter doesNotExist ../../_files/BankAccountTest.php
2+
phpunit --filter BarTest tests/FooTest.php
33
--FILE--
44
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--debug';
56
$_SERVER['argv'][] = '--do-not-cache-result';
67
$_SERVER['argv'][] = '--no-configuration';
78
$_SERVER['argv'][] = '--filter';
8-
$_SERVER['argv'][] = 'doesNotExist';
9-
$_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php';
9+
$_SERVER['argv'][] = 'BarTest';
10+
$_SERVER['argv'][] = __DIR__ . '/../_files/groups/tests/FooTest.php';
1011

1112
require_once __DIR__ . '/../../bootstrap.php';
1213
PHPUnit\TextUI\Command::main();
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
phpunit --filter BarTest
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--debug';
6+
$_SERVER['argv'][] = '--do-not-cache-result';
7+
$_SERVER['argv'][] = '--configuration';
8+
$_SERVER['argv'][] = __DIR__ . '/../_files/groups';
9+
$_SERVER['argv'][] = '--filter';
10+
$_SERVER['argv'][] = 'BarTest';
11+
12+
require_once __DIR__ . '/../../bootstrap.php';
13+
PHPUnit\TextUI\Command::main();
14+
--EXPECTF--
15+
PHPUnit %s by Sebastian Bergmann and contributors.
16+
17+
No tests executed!

tests/end-to-end/cli/filter-dataprovider-by-classname-and-range-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-dataprovider-by-number-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-dataprovider-by-only-range-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-dataprovider-by-only-regexp-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-dataprovider-by-only-string-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-dataprovider-by-range-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/end-to-end/cli/filter-dataprovider-by-regexp-isolation.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)