@@ -251,6 +251,7 @@ public function testPreStoreResponseNoStore()
251
251
$ httpCache = $ this ->getHttpCachePartialMock ();
252
252
$ testListener = new TestListener ($ this , $ httpCache , $ request );
253
253
$ testListener ->preStoreResponse = $ preStoreResponse ;
254
+ $ this ->assertTrue (method_exists ($ httpCache , 'addSubscriber ' ));
254
255
$ httpCache ->addSubscriber ($ testListener );
255
256
256
257
$ store = $ this ->createMock (StoreInterface::class);
@@ -279,8 +280,8 @@ public function testPreInvalidateCalled(): void
279
280
280
281
$ httpCache = $ this ->getHttpCachePartialMock (['pass ' ]);
281
282
$ testListener = new TestListener ($ this , $ httpCache , $ request );
282
- $ httpCache ->addSubscriber ($ testListener );
283
283
$ this ->assertTrue (method_exists ($ httpCache , 'addSubscriber ' ));
284
+ $ httpCache ->addSubscriber ($ testListener );
284
285
$ httpCache
285
286
->method ('pass ' )
286
287
->with ($ request )
@@ -307,8 +308,8 @@ public function testPreInvalidateReturnEarly(): void
307
308
$ httpCache = $ this ->getHttpCachePartialMock (['pass ' ]);
308
309
$ testListener = new TestListener ($ this , $ httpCache , $ request );
309
310
$ testListener ->preInvalidateResponse = $ response ;
310
- $ httpCache ->addSubscriber ($ testListener );
311
311
$ this ->assertTrue (method_exists ($ httpCache , 'addSubscriber ' ));
312
+ $ httpCache ->addSubscriber ($ testListener );
312
313
$ httpCache
313
314
->expects ($ this ->never ())
314
315
->method ('pass ' )
@@ -327,6 +328,7 @@ public function testAddListener(): void
327
328
328
329
$ httpCache = $ this ->getHttpCachePartialMock (['lookup ' ]);
329
330
$ simpleListener = new SimpleListener ($ this , $ httpCache , $ request );
331
+ $ this ->assertTrue (method_exists ($ httpCache , 'addListener ' ));
330
332
$ httpCache ->addListener (Events::PRE_HANDLE , [$ simpleListener , 'callback ' ]);
331
333
332
334
$ httpCache
0 commit comments