Skip to content

Commit 22d21c6

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: [Phpunit] Fix running skipped tests expecting only deprecations Fix merge [Config] dont catch instances of Error [HttpClient] fix HttpClientDataCollector when handling canceled responses [DependencyInjection] #35505 Fix typo in test name [Yaml][Inline] Fail properly on empty object tag and empty const tag Check non-null type for numeric type Check value isset to avoid PHP notice bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2 parents 6b6f045 + 53af3b2 commit 22d21c6

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ public function startTest($test)
211211
}
212212
}
213213

214+
if (!$test->getTestResultObject()) {
215+
return;
216+
}
217+
214218
$annotations = Test::parseTestMethodAnnotations(\get_class($test), $test->getName(false));
215219

216220
if (isset($annotations['class']['expectedDeprecation'])) {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bridge\PhpUnit\Tests;
13+
14+
use PHPUnit\Framework\TestCase;
15+
16+
/**
17+
* This test is meant to be skipped.
18+
*
19+
* @requires extension ext-dummy
20+
*/
21+
final class OnlyExpectingDeprecationSkippedTest extends TestCase
22+
{
23+
/**
24+
* Do not remove this test in the next major versions.
25+
*
26+
* @group legacy
27+
*
28+
* @expectedDeprecation unreachable
29+
*/
30+
public function testExpectingOnlyDeprecations()
31+
{
32+
$this->fail('should never be ran.');
33+
}
34+
}

0 commit comments

Comments
 (0)