@@ -66,13 +66,15 @@ public function testPublishUpdate()
66
66
$ iriConverterProphecy ->getIriFromItem ($ toDeleteExpressionLanguage , UrlGeneratorInterface::ABS_URL )->willReturn ('http://example.com/dummy_friends/4 ' )->shouldBeCalled ();
67
67
68
68
$ resourceMetadataFactoryProphecy = $ this ->prophesize (ResourceMetadataFactoryInterface::class);
69
- $ resourceMetadataFactoryProphecy ->create (Dummy::class)->willReturn (new ResourceMetadata (null , null , null , null , null , ['mercure ' => true ]));
69
+ $ resourceMetadataFactoryProphecy ->create (Dummy::class)->willReturn (new ResourceMetadata (null , null , null , null , null , ['mercure ' => true , ' normalization_context ' => [ ' groups ' => [ ' foo ' , ' bar ' ]] ]));
70
70
$ resourceMetadataFactoryProphecy ->create (DummyCar::class)->willReturn (new ResourceMetadata ());
71
71
$ resourceMetadataFactoryProphecy ->create (DummyFriend::class)->willReturn (new ResourceMetadata (null , null , null , null , null , ['mercure ' => "['foo', 'bar'] " ]));
72
72
73
73
$ serializerProphecy = $ this ->prophesize (SerializerInterface::class);
74
- $ serializerProphecy ->serialize ($ toInsert , 'jsonld ' )->willReturn ('1 ' );
75
- $ serializerProphecy ->serialize ($ toUpdate , 'jsonld ' )->willReturn ('2 ' );
74
+ $ serializerProphecy ->serialize ($ toInsert , 'jsonld ' , ['groups ' => ['foo ' , 'bar ' ]])->willReturn ('1 ' );
75
+ $ serializerProphecy ->serialize ($ toUpdate , 'jsonld ' , ['groups ' => ['foo ' , 'bar ' ]])->willReturn ('2 ' );
76
+
77
+ $ formats = ['jsonld ' => ['application/ld+json ' ], 'jsonhal ' => ['application/hal+json ' ]];
76
78
77
79
$ topics = [];
78
80
$ targets = [];
@@ -88,6 +90,7 @@ public function testPublishUpdate()
88
90
$ iriConverterProphecy ->reveal (),
89
91
$ resourceMetadataFactoryProphecy ->reveal (),
90
92
$ serializerProphecy ->reveal (),
93
+ $ formats ,
91
94
null ,
92
95
$ publisher
93
96
);
@@ -118,6 +121,7 @@ public function testNoPublisher()
118
121
$ this ->prophesize (IriConverterInterface::class)->reveal (),
119
122
$ this ->prophesize (ResourceMetadataFactoryInterface::class)->reveal (),
120
123
$ this ->prophesize (SerializerInterface::class)->reveal (),
124
+ ['jsonld ' => ['application/ld+json ' ], 'jsonhal ' => ['application/hal+json ' ]],
121
125
null ,
122
126
null
123
127
);
@@ -145,6 +149,7 @@ public function testInvalidMercureAttribute()
145
149
$ iriConverterProphecy ->reveal (),
146
150
$ resourceMetadataFactoryProphecy ->reveal (),
147
151
$ serializerProphecy ->reveal (),
152
+ ['jsonld ' => ['application/ld+json ' ], 'jsonhal ' => ['application/hal+json ' ]],
148
153
null ,
149
154
function (Update $ update ): string {
150
155
return 'will never be called ' ;
0 commit comments