1111use PHPUnit \Framework \MockObject \MockObject ;
1212use PHPUnit \Framework \TestCase ;
1313use Symfony \Component \DependencyInjection \ContainerInterface ;
14+ use Symfony \Component \HttpFoundation \InputBag ;
1415use Symfony \Component \HttpFoundation \ParameterBag ;
1516use Symfony \Component \HttpFoundation \Request ;
1617use Symfony \Component \HttpKernel \Event \ControllerEvent ;
@@ -64,7 +65,7 @@ public function testItSetsGraphQLRateLimitIfAnnotationProvidedWithDefaultValue()
6465 $ this ->createGraphQLReadRateLimitAnnotationListener ();
6566 $ request = $ this ->createMock (Request::class);
6667 $ request ->attributes = new ParameterBag ();
67- $ request ->request = new ParameterBag ();
68+ $ request ->request = new InputBag ();
6869 $ event = $ this ->createEventWithGraphQLAnnotation ($ request , false );
6970
7071 $ this ->container ->expects ($ this ->never ())
@@ -94,7 +95,7 @@ public function testItSetsGraphQLRateLimitIfAnnotationProvidedWithCustomValue():
9495 $ this ->createGraphQLReadRateLimitAnnotationListener ();
9596 $ request = $ this ->createMock (Request::class);
9697 $ request ->attributes = new ParameterBag ();
97- $ request ->request = new ParameterBag ();
98+ $ request ->request = new InputBag ();
9899 $ event = $ this ->createEventWithGraphQLAnnotation ($ request , true );
99100
100101 $ this ->container ->expects ($ this ->never ())
@@ -124,7 +125,7 @@ public function testIttDoesNotSetRateLimitIfGraphQLAnnotationAndEndpointNotConfi
124125 $ this ->createGraphQLReadRateLimitAnnotationListener ();
125126 $ request = $ this ->createMock (Request::class);
126127 $ request ->attributes = new ParameterBag ();
127- $ request ->request = new ParameterBag ();
128+ $ request ->request = new InputBag ();
128129 $ event = $ this ->createEventWithGraphQLAnnotation ($ request , false );
129130
130131 $ this ->container ->expects ($ this ->never ())
@@ -147,7 +148,7 @@ public function testItSetsGraphQLRateLimitIfPackageNotInstalled(): void
147148 $ this ->createGraphQLReadRateLimitAnnotationListener ();
148149 $ request = $ this ->createMock (Request::class);
149150 $ request ->attributes = new ParameterBag ();
150- $ request ->request = new ParameterBag ();
151+ $ request ->request = new InputBag ();
151152 $ event = $ this ->createEventWithGraphQLAnnotation ($ request , false );
152153
153154 $ this ->annotationReader ->expects ($ this ->once ())->method ('getMethodAnnotation ' )->willReturn (new GraphQLRateLimitAnnotation (['endpoints ' => [['endpoint ' => 'GetObject ' ]]]));
0 commit comments