Skip to content

Commit 0ba9e36

Browse files
jderussenicolas-grekas
authored andcommitted
Replace warning by isolated test
1 parent 5d1036e commit 0ba9e36

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Tests/Resource/ClassExistenceResourceTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use PHPUnit\Framework\Warning;
1615
use Symfony\Component\Config\Resource\ClassExistenceResource;
1716
use Symfony\Component\Config\Tests\Fixtures\BadParent;
1817
use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
@@ -76,23 +75,22 @@ public function testExistsKo()
7675
}
7776
}
7877

78+
/**
79+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
80+
*/
7981
public function testBadParentWithTimestamp()
8082
{
81-
if (\PHP_VERSION_ID >= 70400) {
82-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
83-
}
84-
8583
$res = new ClassExistenceResource(BadParent::class, false);
8684
$this->assertTrue($res->isFresh(time()));
8785
}
8886

87+
/**
88+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
89+
*/
8990
public function testBadParentWithNoTimestamp()
9091
{
9192
$this->expectException('ReflectionException');
9293
$this->expectExceptionMessage('Class Symfony\Component\Config\Tests\Fixtures\MissingParent not found');
93-
if (\PHP_VERSION_ID >= 70400) {
94-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
95-
}
9694

9795
$res = new ClassExistenceResource(BadParent::class, false);
9896
$res->isFresh(0);

0 commit comments

Comments
 (0)