diff --git a/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/phpunit.xml b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/phpunit.xml
new file mode 100644
index 00000000000..20c26dddd85
--- /dev/null
+++ b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/phpunit.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ tests
+
+
+
+
+
diff --git a/tests/end-to-end/regression/6028/src/.gitkeep b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/src/.gitkeep
similarity index 100%
rename from tests/end-to-end/regression/6028/src/.gitkeep
rename to tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/src/.gitkeep
diff --git a/tests/end-to-end/regression/6028/tests/Issue6028Test.php b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/tests/DeprecationInTestCodeTest.php
similarity index 82%
rename from tests/end-to-end/regression/6028/tests/Issue6028Test.php
rename to tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/tests/DeprecationInTestCodeTest.php
index 906b11de856..1213b7f2d2e 100644
--- a/tests/end-to-end/regression/6028/tests/Issue6028Test.php
+++ b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code-ignored/tests/DeprecationInTestCodeTest.php
@@ -7,13 +7,13 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
-namespace PHPUnit\TestFixture\Issue6028;
+namespace PHPUnit\TestFixture\SelfDirectIndirect;
use const E_USER_DEPRECATED;
use function trigger_error;
use PHPUnit\Framework\TestCase;
-final class Issue6028Test extends TestCase
+final class DeprecationInTestCodeTest extends TestCase
{
public function testOne(): void
{
diff --git a/tests/end-to-end/regression/6028/phpunit.xml b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/phpunit.xml
similarity index 86%
rename from tests/end-to-end/regression/6028/phpunit.xml
rename to tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/phpunit.xml
index f2074c54f05..a501786e420 100644
--- a/tests/end-to-end/regression/6028/phpunit.xml
+++ b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/phpunit.xml
@@ -1,6 +1,6 @@
diff --git a/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/src/.gitkeep b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/src/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/tests/DeprecationInTestCodeTest.php b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/tests/DeprecationInTestCodeTest.php
new file mode 100644
index 00000000000..1213b7f2d2e
--- /dev/null
+++ b/tests/end-to-end/self-direct-indirect/_files/deprecation-in-test-code/tests/DeprecationInTestCodeTest.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PHPUnit\TestFixture\SelfDirectIndirect;
+
+use const E_USER_DEPRECATED;
+use function trigger_error;
+use PHPUnit\Framework\TestCase;
+
+final class DeprecationInTestCodeTest extends TestCase
+{
+ public function testOne(): void
+ {
+ trigger_error('message', E_USER_DEPRECATED);
+
+ $this->assertTrue(true);
+ }
+}
diff --git a/tests/end-to-end/self-direct-indirect/deprecation-in-test-code-ignored.phpt b/tests/end-to-end/self-direct-indirect/deprecation-in-test-code-ignored.phpt
new file mode 100644
index 00000000000..205d2aa30d6
--- /dev/null
+++ b/tests/end-to-end/self-direct-indirect/deprecation-in-test-code-ignored.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Deprecation in test code is not reported when it is configured to not be reported
+--FILE--
+run($_SERVER['argv']);
+--EXPECTF--
+PHPUnit %s by Sebastian Bergmann and contributors.
+
+Runtime: %s
+Configuration: %sphpunit.xml
+
+. 1 / 1 (100%)
+
+Time: %s, Memory: %s
+
+OK (1 test, 1 assertion)
diff --git a/tests/end-to-end/regression/6028.phpt b/tests/end-to-end/self-direct-indirect/deprecation-in-test-code.phpt
similarity index 63%
rename from tests/end-to-end/regression/6028.phpt
rename to tests/end-to-end/self-direct-indirect/deprecation-in-test-code.phpt
index ebdf9236fd3..ffd0b5a9e2d 100644
--- a/tests/end-to-end/regression/6028.phpt
+++ b/tests/end-to-end/self-direct-indirect/deprecation-in-test-code.phpt
@@ -1,13 +1,13 @@
--TEST--
-https://github.com/sebastianbergmann/phpunit/issues/6028
+Deprecation in test code is reported when it is configured to be reported
--FILE--
run($_SERVER['argv']);
--EXPECTF--
@@ -22,13 +22,13 @@ Time: %s, Memory: %s
1 test triggered 1 deprecation:
-1) %sIssue6028Test.php:20
+1) %sDeprecationInTestCodeTest.php:20
message
Triggered by:
-* PHPUnit\TestFixture\Issue6028\Issue6028Test::testOne
- %sIssue6028Test.php:18
+* PHPUnit\TestFixture\SelfDirectIndirect\DeprecationInTestCodeTest::testOne
+ %sDeprecationInTestCodeTest.php:18
OK, but there were issues!
Tests: 1, Assertions: 1, Deprecations: 1.