|
18 | 18 | use Symfony\Component\Messenger\Stamp\ErrorDetailsStamp;
|
19 | 19 | use Symfony\Component\Messenger\Transport\Serialization\Normalizer\FlattenExceptionNormalizer;
|
20 | 20 | use Symfony\Component\Messenger\Transport\Serialization\Serializer;
|
21 |
| -use Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor; |
22 |
| -use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; |
23 | 21 | use Symfony\Component\Serializer\Encoder\JsonEncoder;
|
24 | 22 | use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
|
25 | 23 | use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
|
@@ -72,26 +70,4 @@ public function testDeserialization()
|
72 | 70 | $this->assertInstanceOf(ErrorDetailsStamp::class, $deserializedStamp);
|
73 | 71 | $this->assertEquals($stamp, $deserializedStamp);
|
74 | 72 | }
|
75 |
| - |
76 |
| - public function testDeserializationWithStringExceptionCode() |
77 |
| - { |
78 |
| - $exception = new StringErrorCodeException('exception message', 'some code'); |
79 |
| - $stamp = ErrorDetailsStamp::create($exception); |
80 |
| - $extractor = new ConstructorExtractor([ |
81 |
| - new ReflectionExtractor(), |
82 |
| - ]); |
83 |
| - $serializer = new Serializer( |
84 |
| - new SymfonySerializer([ |
85 |
| - new ArrayDenormalizer(), |
86 |
| - new FlattenExceptionNormalizer(), |
87 |
| - new ObjectNormalizer(null, null, null, $extractor, null, null, []), |
88 |
| - ], [new JsonEncoder()]) |
89 |
| - ); |
90 |
| - |
91 |
| - $deserializedEnvelope = $serializer->decode($serializer->encode(new Envelope(new \stdClass(), [$stamp]))); |
92 |
| - |
93 |
| - $deserializedStamp = $deserializedEnvelope->last(ErrorDetailsStamp::class); |
94 |
| - $this->assertInstanceOf(ErrorDetailsStamp::class, $deserializedStamp); |
95 |
| - $this->assertEquals($stamp, $deserializedStamp); |
96 |
| - } |
97 | 73 | }
|
0 commit comments