@@ -87,7 +87,7 @@ public function testCachePageIncomingRequest(): void
8787 {
8888 $ pageCache = $ this ->createResponseCache ();
8989
90- $ response = new Response (new App () );
90+ $ response = new Response ();
9191 $ response ->setHeader ('ETag ' , 'abcd1234 ' );
9292 $ response ->setBody ('The response body. ' );
9393
@@ -97,37 +97,37 @@ public function testCachePageIncomingRequest(): void
9797 ));
9898
9999 // Check cache with a request with the same URI path.
100- $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('foo/bar ' ), new Response (new App () ));
100+ $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('foo/bar ' ), new Response ());
101101 $ this ->assertInstanceOf (ResponseInterface::class, $ cachedResponse );
102102 $ this ->assertSame ('The response body. ' , $ cachedResponse ->getBody ());
103103 $ this ->assertSame ('abcd1234 ' , $ cachedResponse ->getHeaderLine ('ETag ' ));
104104
105105 // Check cache with a request with the same URI path and different query string.
106106 $ cachedResponse = $ pageCache ->get (
107107 $ this ->createIncomingRequest ('foo/bar ' , ['foo ' => 'bar ' , 'bar ' => 'baz ' ]),
108- new Response (new App () ),
108+ new Response (),
109109 );
110110 $ this ->assertInstanceOf (ResponseInterface::class, $ cachedResponse );
111111 $ this ->assertSame ('The response body. ' , $ cachedResponse ->getBody ());
112112 $ this ->assertSame ('abcd1234 ' , $ cachedResponse ->getHeaderLine ('ETag ' ));
113113
114114 // Check cache with another request with the different URI path.
115- $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('another ' ), new Response (new App () ));
115+ $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('another ' ), new Response ());
116116 $ this ->assertNotInstanceOf (ResponseInterface::class, $ cachedResponse );
117117 }
118118
119119 public function testCachePageIncomingRequestWithStatus (): void
120120 {
121121 $ pageCache = $ this ->createResponseCache ();
122122
123- $ response = new Response (new App () );
123+ $ response = new Response ();
124124 $ response ->setStatusCode (432 , 'Foo Bar ' );
125125 $ response ->setBody ('The response body. ' );
126126
127127 $ this ->assertTrue ($ pageCache ->make ($ this ->createIncomingRequest ('foo/bar ' ), $ response ));
128128
129129 // Check cached response status
130- $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('foo/bar ' ), new Response (new App () ));
130+ $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('foo/bar ' ), new Response ());
131131 $ this ->assertInstanceOf (ResponseInterface::class, $ cachedResponse );
132132 $ this ->assertSame (432 , $ cachedResponse ->getStatusCode ());
133133 $ this ->assertSame ('Foo Bar ' , $ cachedResponse ->getReasonPhrase ());
@@ -143,7 +143,7 @@ public function testCachePageIncomingRequestWithCacheQueryString(): void
143143
144144 $ request = $ this ->createIncomingRequest ('foo/bar ' , ['foo ' => 'bar ' , 'bar ' => 'baz ' ]);
145145
146- $ response = new Response (new App () );
146+ $ response = new Response ();
147147 $ response ->setHeader ('ETag ' , 'abcd1234 ' );
148148 $ response ->setBody ('The response body. ' );
149149
@@ -152,7 +152,7 @@ public function testCachePageIncomingRequestWithCacheQueryString(): void
152152 // Check cache with a request with the same URI path and same query string.
153153 $ cachedResponse = $ pageCache ->get (
154154 $ this ->createIncomingRequest ('foo/bar ' , ['foo ' => 'bar ' , 'bar ' => 'baz ' ]),
155- new Response (new App () ),
155+ new Response (),
156156 );
157157 $ this ->assertInstanceOf (ResponseInterface::class, $ cachedResponse );
158158 $ this ->assertSame ('The response body. ' , $ cachedResponse ->getBody ());
@@ -161,28 +161,28 @@ public function testCachePageIncomingRequestWithCacheQueryString(): void
161161 // Check cache with a request with the same URI path and different query string.
162162 $ cachedResponse = $ pageCache ->get (
163163 $ this ->createIncomingRequest ('foo/bar ' , ['xfoo ' => 'bar ' , 'bar ' => 'baz ' ]),
164- new Response (new App () ),
164+ new Response (),
165165 );
166166 $ this ->assertNotInstanceOf (ResponseInterface::class, $ cachedResponse );
167167
168168 // Check cache with another request with the different URI path.
169- $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('another ' ), new Response (new App () ));
169+ $ cachedResponse = $ pageCache ->get ($ this ->createIncomingRequest ('another ' ), new Response ());
170170 $ this ->assertNotInstanceOf (ResponseInterface::class, $ cachedResponse );
171171 }
172172
173173 public function testCachePageIncomingRequestWithHttpMethods (): void
174174 {
175175 $ pageCache = $ this ->createResponseCache ();
176176
177- $ response = new Response (new App () );
177+ $ response = new Response ();
178178 $ response ->setBody ('The response body. ' );
179179
180180 $ this ->assertTrue ($ pageCache ->make ($ this ->createIncomingRequest ('foo/bar ' ), $ response ));
181181
182182 // Check cache with a request with the same URI path and different HTTP method
183183 $ cachedResponse = $ pageCache ->get (
184184 $ this ->createIncomingRequest ('foo/bar ' )->withMethod ('POST ' ),
185- new Response (new App () ),
185+ new Response (),
186186 );
187187 $ this ->assertNotInstanceOf (ResponseInterface::class, $ cachedResponse );
188188 }
@@ -191,18 +191,18 @@ public function testCachePageCLIRequest(): void
191191 {
192192 $ pageCache = $ this ->createResponseCache ();
193193
194- $ response = new Response (new App () );
194+ $ response = new Response ();
195195 $ response ->setBody ('The response body. ' );
196196
197197 $ this ->assertTrue ($ pageCache ->make ($ this ->createCLIRequest (['foo ' , 'bar ' ]), $ response ));
198198
199199 // Check cache with a request with the same params.
200- $ cachedResponse = $ pageCache ->get ($ this ->createCLIRequest (['foo ' , 'bar ' ]), new Response (new App () ));
200+ $ cachedResponse = $ pageCache ->get ($ this ->createCLIRequest (['foo ' , 'bar ' ]), new Response ());
201201 $ this ->assertInstanceOf (ResponseInterface::class, $ cachedResponse );
202202 $ this ->assertSame ('The response body. ' , $ cachedResponse ->getBody ());
203203
204204 // Check cache with another request with the different params.
205- $ cachedResponse = $ pageCache ->get ($ this ->createCLIRequest (['baz ' ]), new Response (new App () ));
205+ $ cachedResponse = $ pageCache ->get ($ this ->createCLIRequest (['baz ' ]), new Response ());
206206 $ this ->assertNotInstanceOf (ResponseInterface::class, $ cachedResponse );
207207 }
208208
@@ -217,7 +217,7 @@ public function testUnserializeError(): void
217217
218218 $ request = $ this ->createIncomingRequest ('foo/bar ' );
219219
220- $ response = new Response (new App () );
220+ $ response = new Response ();
221221 $ response ->setHeader ('ETag ' , 'abcd1234 ' );
222222 $ response ->setBody ('The response body. ' );
223223
@@ -229,7 +229,7 @@ public function testUnserializeError(): void
229229 $ mockCache ->save ($ cacheKey , 'Invalid data ' );
230230
231231 // Check cache with a request with the same URI path.
232- $ pageCache ->get ($ request , new Response (new App () ));
232+ $ pageCache ->get ($ request , new Response ());
233233 }
234234
235235 public function testInvalidCacheError (): void
@@ -243,7 +243,7 @@ public function testInvalidCacheError(): void
243243
244244 $ request = $ this ->createIncomingRequest ('foo/bar ' );
245245
246- $ response = new Response (new App () );
246+ $ response = new Response ();
247247 $ response ->setHeader ('ETag ' , 'abcd1234 ' );
248248 $ response ->setBody ('The response body. ' );
249249
@@ -255,6 +255,6 @@ public function testInvalidCacheError(): void
255255 $ mockCache ->save ($ cacheKey , serialize (['a ' => '1 ' ]));
256256
257257 // Check cache with a request with the same URI path.
258- $ pageCache ->get ($ request , new Response (new App () ));
258+ $ pageCache ->get ($ request , new Response ());
259259 }
260260}
0 commit comments