23
23
use Symfony \Component \HttpKernel \Event \ResponseEvent ;
24
24
use Symfony \Component \HttpKernel \EventListener \AbstractSessionListener ;
25
25
use Symfony \Component \HttpKernel \HttpKernelInterface ;
26
- use Symfony \Component \HttpKernel \Kernel ;
27
26
28
27
class UserContextListenerTest extends TestCase
29
28
{
@@ -238,10 +237,6 @@ public function testOnKernelResponse()
238
237
239
238
public function testOnKernelResponseSetsNoAutoCacheHeader ()
240
239
{
241
- if (\version_compare ('4.1 ' , Kernel::VERSION , '> ' )) {
242
- $ this ->markTestSkipped ('Test only relevant for Symfony 4.1 and up ' );
243
- }
244
-
245
240
$ request = new Request ();
246
241
$ request ->setMethod ('HEAD ' );
247
242
$ request ->headers ->set ('X-User-Context-Hash ' , 'hash ' );
@@ -263,10 +258,6 @@ public function testOnKernelResponseSetsNoAutoCacheHeader()
263
258
264
259
public function testOnKernelResponseDoesNotSetNoAutoCacheHeaderWhenNoSessionListener ()
265
260
{
266
- if (\version_compare ('4.1 ' , Kernel::VERSION , '> ' )) {
267
- $ this ->markTestSkipped ('Test only relevant for Symfony 4.1 and up ' );
268
- }
269
-
270
261
$ request = new Request ();
271
262
$ request ->setMethod ('HEAD ' );
272
263
$ request ->headers ->set ('X-User-Context-Hash ' , 'hash ' );
@@ -292,10 +283,6 @@ public function testOnKernelResponseDoesNotSetNoAutoCacheHeaderWhenNoSessionList
292
283
293
284
public function testOnKernelResponseSetsNoAutoCacheHeaderWhenCustomHeader ()
294
285
{
295
- if (\version_compare ('4.1 ' , Kernel::VERSION , '> ' )) {
296
- $ this ->markTestSkipped ('Test only relevant for Symfony 4.1 and up ' );
297
- }
298
-
299
286
$ request = new Request ();
300
287
$ request ->setMethod ('HEAD ' );
301
288
$ request ->headers ->set ('X-User-Context-Hash ' , 'hash ' );
@@ -316,10 +303,6 @@ public function testOnKernelResponseSetsNoAutoCacheHeaderWhenCustomHeader()
316
303
317
304
public function testOnKernelResponseSetsNoAutoCacheHeaderWhenCustomHeaderAndNoAddVaryOnHash ()
318
305
{
319
- if (\version_compare ('4.1 ' , Kernel::VERSION , '> ' )) {
320
- $ this ->markTestSkipped ('Test only relevant for Symfony 4.1 and up ' );
321
- }
322
-
323
306
$ request = new Request ();
324
307
$ request ->setMethod ('HEAD ' );
325
308
$ request ->headers ->set ('X-User-Context-Hash ' , 'hash ' );
@@ -345,10 +328,6 @@ public function testOnKernelResponseSetsNoAutoCacheHeaderWhenCustomHeaderAndNoAd
345
328
346
329
public function testOnKernelResponseDoesNotSetNoAutoCacheHeaderWhenNoCustomHeaderAndNoAddVaryOnHash ()
347
330
{
348
- if (\version_compare ('4.1 ' , Kernel::VERSION , '> ' )) {
349
- $ this ->markTestSkipped ('Test only relevant for Symfony 4.1 and up ' );
350
- }
351
-
352
331
$ request = new Request ();
353
332
$ request ->setMethod ('HEAD ' );
354
333
$ request ->headers ->set ('X-User-Context-Hash ' , 'hash ' );
0 commit comments