1616use FOS \HttpCache \Test \Proxy \ProxyInterface ;
1717use Guzzle \Http \ClientInterface ;
1818use Guzzle \Http \Message \Response ;
19+ use Http \Adapter \HttpAdapter ;
20+ use Http \Discovery \MessageFactoryDiscovery ;
1921use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
2022use Symfony \Component \DependencyInjection \ContainerInterface ;
2123
@@ -71,7 +73,7 @@ public static function isCacheMiss()
7173 * Get HTTP test client for making requests to your application through a
7274 * live caching proxy.
7375 *
74- * @return ClientInterface
76+ * @return HttpAdapter
7577 */
7678 protected function getHttpClient ()
7779 {
@@ -81,15 +83,22 @@ protected function getHttpClient()
8183 /**
8284 * Get a response from your application through a live caching proxy.
8385 *
84- * @param string $url Request URL (absolute or relative)
86+ * @param string $uri Request URL (absolute or relative)
8587 * @param array $headers Request HTTP headers
8688 * @param array $options Request options
8789 *
8890 * @return Response
8991 */
90- protected function getResponse ($ url , array $ headers = array (), $ options = array ())
92+ protected function getResponse ($ uri , array $ headers = array ())
9193 {
92- return $ this ->getHttpClient ()->get ($ url , $ headers , $ options )->send ();
94+ $ request = MessageFactoryDiscovery::find ()->createRequest (
95+ 'GET ' ,
96+ $ uri ,
97+ '1.1 ' ,
98+ $ headers
99+ );
100+
101+ return $ this ->getHttpClient ()->sendRequest ($ request );
93102 }
94103
95104 /**
0 commit comments