Skip to content

Commit 7269a3d

Browse files
committed
minor #53384 [Serializer] fix tests (xabbuh)
This PR was merged into the 7.1 branch. Discussion ---------- [Serializer] fix tests | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- e6355ea fix tests
2 parents c8a6590 + e6355ea commit 7269a3d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Symfony/Component/Serializer/Tests/SerializerTest.php

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

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\PropertyAccess\Exception\InvalidTypeException;
1516
use Symfony\Component\PropertyAccess\PropertyAccessor;
1617
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
1718
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
@@ -1253,7 +1254,7 @@ public function testCollectDenormalizationErrorsWithoutTypeExtractor()
12531254
[
12541255
'currentType' => 'array',
12551256
'expectedTypes' => [
1256-
'string',
1257+
class_exists(InvalidTypeException::class) ? 'string' : 'unknown',
12571258
],
12581259
'path' => 'string',
12591260
'useMessageForUser' => false,
@@ -1262,7 +1263,7 @@ public function testCollectDenormalizationErrorsWithoutTypeExtractor()
12621263
[
12631264
'currentType' => 'array',
12641265
'expectedTypes' => [
1265-
'int',
1266+
class_exists(InvalidTypeException::class) ? 'int' : 'unknown',
12661267
],
12671268
'path' => 'int',
12681269
'useMessageForUser' => false,
@@ -1271,7 +1272,7 @@ public function testCollectDenormalizationErrorsWithoutTypeExtractor()
12711272
[
12721273
'currentType' => 'array',
12731274
'expectedTypes' => [
1274-
'float',
1275+
class_exists(InvalidTypeException::class) ? 'float' : 'unknown',
12751276
],
12761277
'path' => 'float',
12771278
'useMessageForUser' => false,

0 commit comments

Comments
 (0)