77use FOS \HttpCache \Test \Proxy \ProxyInterface ;
88use Guzzle \Http \ClientInterface ;
99use Guzzle \Http \Message \Response ;
10+ use Http \Adapter \HttpAdapter ;
11+ use Http \Discovery \MessageFactoryDiscovery ;
1012use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
1113use Symfony \Component \DependencyInjection \ContainerInterface ;
1214
@@ -62,7 +64,7 @@ public static function isCacheMiss()
6264 * Get HTTP test client for making requests to your application through a
6365 * live caching proxy
6466 *
65- * @return ClientInterface
67+ * @return HttpAdapter
6668 */
6769 protected function getHttpClient ()
6870 {
@@ -72,15 +74,22 @@ protected function getHttpClient()
7274 /**
7375 * Get a response from your application through a live caching proxy
7476 *
75- * @param string $url Request URL (absolute or relative)
77+ * @param string $uri Request URL (absolute or relative)
7678 * @param array $headers Request HTTP headers
7779 * @param array $options Request options
7880 *
7981 * @return Response
8082 */
81- protected function getResponse ($ url , array $ headers = array (), $ options = array ())
83+ protected function getResponse ($ uri , array $ headers = array ())
8284 {
83- return $ this ->getHttpClient ()->get ($ url , $ headers , $ options )->send ();
85+ $ request = MessageFactoryDiscovery::find ()->createRequest (
86+ 'GET ' ,
87+ $ uri ,
88+ '1.1 ' ,
89+ $ headers
90+ );
91+
92+ return $ this ->getHttpClient ()->sendRequest ($ request );
8493 }
8594
8695 /**
0 commit comments