Skip to content

Commit 5bb84d9

Browse files
Merge branch '3.4' into 4.3
* 3.4: [Yaml] fix test for PHP 7.4 Add polyfill for TestCase::createMock() Skip tests that fatal-error on PHP 7.4 because of missing parent classes
2 parents b07821b + 00986c0 commit 5bb84d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/Resource/ClassExistenceResourceTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Config\Tests\Resource;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use PHPUnit\Framework\Warning;
1516
use Symfony\Component\Config\Resource\ClassExistenceResource;
1617
use Symfony\Component\Config\Tests\Fixtures\BadParent;
1718
use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
@@ -77,6 +78,10 @@ public function testExistsKo()
7778

7879
public function testBadParentWithTimestamp()
7980
{
81+
if (\PHP_VERSION_ID >= 70400) {
82+
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
83+
}
84+
8085
$res = new ClassExistenceResource(BadParent::class, false);
8186
$this->assertTrue($res->isFresh(time()));
8287
}
@@ -87,6 +92,10 @@ public function testBadParentWithTimestamp()
8792
*/
8893
public function testBadParentWithNoTimestamp()
8994
{
95+
if (\PHP_VERSION_ID >= 70400) {
96+
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
97+
}
98+
9099
$res = new ClassExistenceResource(BadParent::class, false);
91100
$res->isFresh(0);
92101
}

0 commit comments

Comments
 (0)