File tree Expand file tree Collapse file tree 13 files changed +209
-42
lines changed Expand file tree Collapse file tree 13 files changed +209
-42
lines changed Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- phpunit --process-isolation --exclude-group balanceIsInitiallyZero ../../_files/BankAccountTest .php
2
+ phpunit --process-isolation --exclude-group one,two tests/FooTest .php
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
+ $ _SERVER ['argv ' ][] = '--debug ' ;
5
6
$ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
6
7
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
7
8
$ _SERVER ['argv ' ][] = '--process-isolation ' ;
8
9
$ _SERVER ['argv ' ][] = '--exclude-group ' ;
9
- $ _SERVER ['argv ' ][] = 'balanceIsInitiallyZero ' ;
10
- $ _SERVER ['argv ' ][] = __DIR__ . '/../../ _files/BankAccountTest .php ' ;
10
+ $ _SERVER ['argv ' ][] = 'one,two ' ;
11
+ $ _SERVER ['argv ' ][] = __DIR__ . '/../_files/groups/tests/FooTest .php ' ;
11
12
12
13
require_once __DIR__ . '/../../bootstrap.php ' ;
13
14
PHPUnit \TextUI \Command::main ();
14
15
--EXPECTF --
15
16
PHPUnit %s by Sebastian Bergmann and contributors.
16
17
17
- . . 2 / 2 (100 %)
18
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testThree ' started
19
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testThree ' ended
20
+
18
21
19
22
Time: %s, Memory: %s
20
23
21
- OK (2 tests, 2 assertions )
24
+ OK (1 test, 1 assertion )
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- phpunit --exclude-group balanceIsInitiallyZero ../../_files/BankAccountTest .php
2
+ phpunit --exclude-group one,two tests/FooTest .php
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
+ $ _SERVER ['argv ' ][] = '--debug ' ;
5
6
$ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
6
7
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
7
8
$ _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 ' ;
10
11
11
12
require_once __DIR__ . '/../../bootstrap.php ' ;
12
13
PHPUnit \TextUI \Command::main ();
13
14
--EXPECTF --
14
15
PHPUnit %s by Sebastian Bergmann and contributors.
15
16
16
- . . 2 / 2 (100 %)
17
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testThree ' started
18
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testThree ' ended
19
+
17
20
18
21
Time: %s, Memory: %s
19
22
20
- OK (2 tests, 2 assertions )
23
+ OK (1 test, 1 assertion )
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ phpunit --process-isolation --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 ' ][] = '--process-isolation ' ;
8
+ $ _SERVER ['argv ' ][] = '--configuration ' ;
9
+ $ _SERVER ['argv ' ][] = __DIR__ . '/../_files/groups ' ;
10
+ $ _SERVER ['argv ' ][] = '--exclude-group ' ;
11
+ $ _SERVER ['argv ' ][] = 'one,two ' ;
12
+
13
+ require_once __DIR__ . '/../../bootstrap.php ' ;
14
+ PHPUnit \TextUI \Command::main ();
15
+ --EXPECTF --
16
+ PHPUnit %s by Sebastian Bergmann and contributors.
17
+
18
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testThree ' started
19
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testThree ' ended
20
+
21
+
22
+ Time: %s, Memory: %s
23
+
24
+ OK (1 test, 1 assertion)
Original file line number Diff line number Diff line change
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)
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- phpunit --process-isolation --group balanceIsInitiallyZero ../../_files/BankAccountTest .php
2
+ phpunit --process-isolation --group one tests/FooTest .php
3
3
--FILE--
4
4
<?php declare (strict_types=1 );
5
+ $ _SERVER ['argv ' ][] = '--debug ' ;
5
6
$ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
6
7
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
7
8
$ _SERVER ['argv ' ][] = '--process-isolation ' ;
8
9
$ _SERVER ['argv ' ][] = '--group ' ;
9
- $ _SERVER ['argv ' ][] = 'balanceIsInitiallyZero ' ;
10
- $ _SERVER ['argv ' ][] = __DIR__ . '/../../ _files/BankAccountTest .php ' ;
10
+ $ _SERVER ['argv ' ][] = 'one ' ;
11
+ $ _SERVER ['argv ' ][] = __DIR__ . '/../_files/groups/tests/FooTest .php ' ;
11
12
12
13
require_once __DIR__ . '/../../bootstrap.php ' ;
13
14
PHPUnit \TextUI \Command::main ();
14
15
--EXPECTF --
15
16
PHPUnit %s by Sebastian Bergmann and contributors.
16
17
17
- . 1 / 1 (100 %)
18
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testOne ' started
19
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testOne ' ended
20
+
18
21
19
22
Time: %s, Memory: %s
20
23
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ phpunit --group one 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 ' ][] = '--group ' ;
9
+ $ _SERVER ['argv ' ][] = 'one ' ;
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
+
20
+
21
+ Time: %s, Memory: %s
22
+
23
+ OK (1 test, 1 assertion)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ phpunit --process-isolation --group one
3
+ --FILE--
4
+ <?php declare (strict_types=1 );
5
+ $ _SERVER ['argv ' ][] = '--debug ' ;
6
+ $ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
7
+ $ _SERVER ['argv ' ][] = '--process-isolation ' ;
8
+ $ _SERVER ['argv ' ][] = '--configuration ' ;
9
+ $ _SERVER ['argv ' ][] = __DIR__ . '/../_files/groups ' ;
10
+ $ _SERVER ['argv ' ][] = '--group ' ;
11
+ $ _SERVER ['argv ' ][] = 'one ' ;
12
+
13
+ require_once __DIR__ . '/../../bootstrap.php ' ;
14
+ PHPUnit \TextUI \Command::main ();
15
+ --EXPECTF --
16
+ PHPUnit %s by Sebastian Bergmann and contributors.
17
+
18
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testOne ' started
19
+ Test 'PHPUnit\TestFixture\Groups\FooTest::testOne ' ended
20
+
21
+
22
+ Time: %s, Memory: %s
23
+
24
+ OK (1 test, 1 assertion)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ phpunit --group one
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 ' ][] = '--group ' ;
10
+ $ _SERVER ['argv ' ][] = 'one ' ;
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
+
20
+
21
+ Time: %s, Memory: %s
22
+
23
+ OK (1 test, 1 assertion)
You can’t perform that action at this time.
0 commit comments