Skip to content

Commit b3be029

Browse files
Take #[IgnorePhpunitDeprecations] attribute into account for test runner deprecations
1 parent 3d9b96f commit b3be029

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Event/Emitter/DispatchingEmitter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,13 @@ public function testSuiteFinished(TestSuite $testSuite): void
12081208
*/
12091209
public function testRunnerTriggeredPhpunitDeprecation(string $message): void
12101210
{
1211+
try {
1212+
if (TestMethodBuilder::fromCallStack()->metadata()->isIgnorePhpunitDeprecations()->isNotEmpty()) {
1213+
return;
1214+
}
1215+
} catch (NoTestCaseObjectOnCallStackException) {
1216+
}
1217+
12111218
$this->dispatcher->dispatch(
12121219
new TestRunner\DeprecationTriggered(
12131220
$this->telemetryInfo(),

0 commit comments

Comments
 (0)