Skip to content

Tests for #6097 #6101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 11.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
"tests/_files/CoverageNamespacedFunctionTest.php",
"tests/_files/CoveredFunction.php",
"tests/_files/Generator.php",
"tests/_files/NamespaceCoveredFunction.php"
"tests/_files/NamespaceCoveredFunction.php",
"tests/end-to-end/_files/listing-tests-and-groups/ExampleAbstractTestCase.php"
]
},
"extra": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture\ListingTestsAndGroups;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

abstract class ExampleAbstractTestCase extends TestCase
{
#[Group('abstract-one')]
public function testOne(): void
{
$this->assertTrue(true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture\ListingTestsAndGroups;

final class ExampleExtendingAbstractTest extends ExampleAbstractTestCase
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ require_once __DIR__ . '/../../../bootstrap.php';
PHPUnit %s by Sebastian Bergmann and contributors.

Available test files:
- %slisting-tests-and-groups%sExampleExtendingAbstractTest.php
- %slisting-tests-and-groups%sExampleTest.php
- %slisting-tests-and-groups%sexample.phpt
1 change: 1 addition & 0 deletions tests/end-to-end/cli/list-test-files/list-test-files.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ require_once __DIR__ . '/../../../bootstrap.php';
PHPUnit %s by Sebastian Bergmann and contributors.

Available test files:
- %slisting-tests-and-groups%sExampleExtendingAbstractTest.php
- %slisting-tests-and-groups%sExampleTest.php
- %slisting-tests-and-groups%sexample.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ PHPUnit %s by Sebastian Bergmann and contributors.

Available test groups:
- 3 (1 test)
- abstract-one (1 test)
- default (1 test)
- two (1 test)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ PHPUnit %s by Sebastian Bergmann and contributors.

Available test groups:
- 3 (1 test)
- abstract-one (1 test)
- default (1 test)
- one (1 test)
- two (1 test)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require_once __DIR__ . '/../../../bootstrap.php';
PHPUnit %s by Sebastian Bergmann and contributors.

Available tests:
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testTwo
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testThree
- %sexample.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ require_once __DIR__ . '/../../../bootstrap.php';
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

Available test:
Available tests:
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testOne
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ PHPUnit %s by Sebastian Bergmann and contributors.
<?xml version="1.0"?>
<testSuite xmlns="https://xml.phpunit.de/testSuite">
<tests>
<testClass name="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest" file="%ExampleExtendingAbstractTest.php">
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne" name="testOne"/>
</testClass>
<testClass name="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest" file="%sExampleTest.php">
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testTwo" name="testTwo"/>
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testThree" name="testThree"/>
Expand All @@ -29,6 +32,9 @@ PHPUnit %s by Sebastian Bergmann and contributors.
<group name="3">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testThree"/>
</group>
<group name="abstract-one">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne"/>
</group>
<group name="two">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testTwo"/>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ PHPUnit %s by Sebastian Bergmann and contributors.
<?xml version="1.0"?>
<testSuite xmlns="https://xml.phpunit.de/testSuite">
<tests>
<testClass name="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest" file="%ExampleExtendingAbstractTest.php">
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne" name="testOne"/>
</testClass>
<testClass name="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest" file="%sExampleTest.php">
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testOne" name="testOne"/>
</testClass>
</tests>
<groups>
<group name="abstract-one">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne"/>
</group>
<group name="one">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testOne"/>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ PHPUnit %s by Sebastian Bergmann and contributors.
<?xml version="1.0"?>
<testSuite xmlns="https://xml.phpunit.de/testSuite">
<tests>
<testClass name="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest" file="%ExampleExtendingAbstractTest.php">
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne" name="testOne"/>
</testClass>
<testClass name="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest" file="%sExampleTest.php">
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testOne" name="testOne"/>
<testMethod id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testTwo" name="testTwo"/>
Expand All @@ -29,6 +32,9 @@ PHPUnit %s by Sebastian Bergmann and contributors.
<group name="3">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testThree"/>
</group>
<group name="abstract-one">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne"/>
</group>
<group name="one">
<test id="PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testOne"/>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require_once __DIR__ . '/../../../bootstrap.php';
PHPUnit %s by Sebastian Bergmann and contributors.

Available tests:
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleExtendingAbstractTest::testOne
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testOne
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testTwo
- PHPUnit\TestFixture\ListingTestsAndGroups\ExampleTest::testThree
Expand Down
Loading