Skip to content

Commit c595a69

Browse files
committed
run tests using PHPUnit 11.5
1 parent 129e9e0 commit c595a69

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

Tests/Caster/DoctrineCasterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testCastPersistentCollection()
4040
%A
4141
-backRefFieldName: null
4242
-isDirty: false
43-
-em: $entityManagerClass { …3}
43+
-em: $entityManagerClass { …%d}
4444
-typeClass: Doctrine\ORM\Mapping\ClassMetadata { …}
4545
%A
4646
EODUMP;
@@ -49,7 +49,7 @@ public function testCastPersistentCollection()
4949
$expected = <<<EODUMP
5050
Doctrine\ORM\PersistentCollection {
5151
%A
52-
-em: $entityManagerClass { …3}
52+
-em: $entityManagerClass { …%d}
5353
-backRefFieldName: null
5454
-typeClass: Doctrine\ORM\Mapping\ClassMetadata { …}
5555
%A

Tests/Caster/ResourceCasterTest.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@
1111

1212
namespace Symfony\Component\VarDumper\Tests\Caster;
1313

14+
use PHPUnit\Framework\Attributes\Group;
15+
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
16+
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
1417
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait;
1618
use Symfony\Component\VarDumper\Caster\ResourceCaster;
1719
use Symfony\Component\VarDumper\Cloner\Stub;
1820
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
1921

2022
class ResourceCasterTest extends TestCase
2123
{
22-
use ExpectUserDeprecationMessageTrait;
2324
use VarDumperTestTrait;
2425

25-
/**
26-
* @group legacy
27-
*
28-
* @requires extension curl
29-
*/
26+
#[IgnoreDeprecations]
27+
#[Group('legacy')]
28+
#[RequiresPhpExtension('curl')]
3029
public function testCastCurlIsDeprecated()
3130
{
3231
$ch = curl_init('http://example.com');
@@ -38,11 +37,9 @@ public function testCastCurlIsDeprecated()
3837
ResourceCaster::castCurl($ch, [], new Stub(), false);
3938
}
4039

41-
/**
42-
* @group legacy
43-
*
44-
* @requires extension gd
45-
*/
40+
#[IgnoreDeprecations]
41+
#[Group('legacy')]
42+
#[RequiresPhpExtension('gd')]
4643
public function testCastGdIsDeprecated()
4744
{
4845
$gd = imagecreate(1, 1);

phpunit.xml.dist

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.3/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
77
bootstrap="vendor/autoload.php"
8+
failOnDeprecation="true"
89
failOnRisky="true"
910
failOnWarning="true"
1011
>
@@ -21,7 +22,7 @@
2122
</testsuite>
2223
</testsuites>
2324

24-
<coverage>
25+
<source ignoreSuppressionOfDeprecations="true">
2526
<include>
2627
<directory>./</directory>
2728
</include>
@@ -30,5 +31,9 @@
3031
<directory>./Tests</directory>
3132
<directory>./vendor</directory>
3233
</exclude>
33-
</coverage>
34+
</source>
35+
36+
<extensions>
37+
<bootstrap class="Symfony\Bridge\PhpUnit\SymfonyExtension" />
38+
</extensions>
3439
</phpunit>

0 commit comments

Comments
 (0)