@@ -251,6 +251,7 @@ public function testPreStoreResponseNoStore()
251251 $ httpCache = $ this ->getHttpCachePartialMock ();
252252 $ testListener = new TestListener ($ this , $ httpCache , $ request );
253253 $ testListener ->preStoreResponse = $ preStoreResponse ;
254+ $ this ->assertTrue (method_exists ($ httpCache , 'addSubscriber ' ));
254255 $ httpCache ->addSubscriber ($ testListener );
255256
256257 $ store = $ this ->createMock (StoreInterface::class);
@@ -279,8 +280,8 @@ public function testPreInvalidateCalled(): void
279280
280281 $ httpCache = $ this ->getHttpCachePartialMock (['pass ' ]);
281282 $ testListener = new TestListener ($ this , $ httpCache , $ request );
282- $ httpCache ->addSubscriber ($ testListener );
283283 $ this ->assertTrue (method_exists ($ httpCache , 'addSubscriber ' ));
284+ $ httpCache ->addSubscriber ($ testListener );
284285 $ httpCache
285286 ->method ('pass ' )
286287 ->with ($ request )
@@ -307,8 +308,8 @@ public function testPreInvalidateReturnEarly(): void
307308 $ httpCache = $ this ->getHttpCachePartialMock (['pass ' ]);
308309 $ testListener = new TestListener ($ this , $ httpCache , $ request );
309310 $ testListener ->preInvalidateResponse = $ response ;
310- $ httpCache ->addSubscriber ($ testListener );
311311 $ this ->assertTrue (method_exists ($ httpCache , 'addSubscriber ' ));
312+ $ httpCache ->addSubscriber ($ testListener );
312313 $ httpCache
313314 ->expects ($ this ->never ())
314315 ->method ('pass ' )
@@ -327,6 +328,7 @@ public function testAddListener(): void
327328
328329 $ httpCache = $ this ->getHttpCachePartialMock (['lookup ' ]);
329330 $ simpleListener = new SimpleListener ($ this , $ httpCache , $ request );
331+ $ this ->assertTrue (method_exists ($ httpCache , 'addListener ' ));
330332 $ httpCache ->addListener (Events::PRE_HANDLE , [$ simpleListener , 'callback ' ]);
331333
332334 $ httpCache
0 commit comments