From 86076c87a671758fad769a10111bac66871d5bac Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 3 Jun 2026 20:05:05 +0200 Subject: [PATCH] Stop reporting a skipped test in IntegrationTestCase when there is no legacy test to run --- CHANGELOG | 1 + src/Test/IntegrationTestCase.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 1dc3b49ae..1d347b542 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ # 3.27.2 (2026-XX-XX) + * Stop reporting a skipped test in `IntegrationTestCase` when there is no legacy test to run * Make the `IntegrationTestCase` and `NodeTestCase` test helpers compatible with PHPUnit 11 * Cast printed expressions to string so values that cannot be converted to a string (arrays, non-`Stringable` objects, ...) report a usable stack trace at the print location * Skip the sandbox `__toString` check on arguments whose PHP parameter type cannot implicitly coerce to string diff --git a/src/Test/IntegrationTestCase.php b/src/Test/IntegrationTestCase.php index c35ba8fe4..d4c519371 100644 --- a/src/Test/IntegrationTestCase.php +++ b/src/Test/IntegrationTestCase.php @@ -233,7 +233,10 @@ abstract class IntegrationTestCase extends TestCase protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '') { if (!$outputs) { - $this->markTestSkipped('no tests to run'); + // dummy test added by assembleTests() when there is no (legacy) test to run + $this->expectNotToPerformAssertions(); + + return; } if ($condition) {