@@ -65,7 +65,7 @@ protected function tearDown(): void
65
65
*
66
66
* @return \Generator
67
67
*/
68
- public function getDetectRequestUriData (): \Generator
68
+ public static function getDetectRequestUriData (): \Generator
69
69
{
70
70
// HTTPS, PHP_SELF, REQUEST_URI, HTTP_HOST, SCRIPT_NAME, QUERY_STRING, (resulting uri)
71
71
yield 'HTTP connection with path in PHP_SELF and query string set in REQUEST_URI ' => [
@@ -114,7 +114,7 @@ public function getDetectRequestUriData(): \Generator
114
114
*
115
115
* @return \Generator
116
116
*/
117
- public function getRedirectData (): \Generator
117
+ public static function getRedirectData (): \Generator
118
118
{
119
119
// Note: url, (expected result)
120
120
yield 'with_leading_slash ' => ['/foo ' , 'http:// ' . self ::TEST_HTTP_HOST . '/foo ' ];
@@ -201,7 +201,7 @@ public function testGetDeprecatedInputReadAccess()
201
201
$ object = $ this ->getMockForAbstractClass (AbstractWebApplication::class);
202
202
203
203
// Validate default objects unique to the web application are created
204
- $ this ->assertInstanceOf (Input::class, $ object ->input );
204
+ $ this ->assertInstanceOf (Input::class, $ object ->getInput () );
205
205
}
206
206
207
207
/**
@@ -339,7 +339,7 @@ public function testCompressWithGzipEncoding()
339
339
340
340
$ object = $ this ->getMockBuilder (AbstractWebApplication::class)
341
341
->setConstructorArgs ([null , null , $ mockClient ])
342
- ->setMethods (['checkHeadersSent ' ])
342
+ ->onlyMethods (['checkHeadersSent ' ])
343
343
->getMockForAbstractClass ();
344
344
345
345
$ object ->expects ($ this ->once ())
@@ -409,7 +409,7 @@ public function testCompressWithDeflateEncoding()
409
409
410
410
$ object = $ this ->getMockBuilder (AbstractWebApplication::class)
411
411
->setConstructorArgs ([null , null , $ mockClient ])
412
- ->setMethods (['checkHeadersSent ' ])
412
+ ->onlyMethods (['checkHeadersSent ' ])
413
413
->getMockForAbstractClass ();
414
414
415
415
$ object ->expects ($ this ->once ())
@@ -473,7 +473,7 @@ public function testCompressWithNoAcceptEncodings()
473
473
474
474
$ object = $ this ->getMockBuilder (AbstractWebApplication::class)
475
475
->setConstructorArgs ([null , null , $ mockClient ])
476
- ->setMethods (['checkHeadersSent ' ])
476
+ ->onlyMethods (['checkHeadersSent ' ])
477
477
->getMockForAbstractClass ();
478
478
479
479
// Mock a response.
@@ -531,7 +531,14 @@ public function testCompressWithHeadersSent()
531
531
['deflate ' , 'gzip ' ]
532
532
);
533
533
534
- $ object = $ this ->getMockForAbstractClass (AbstractWebApplication::class, [null , null , $ mockClient ]);
534
+ $ object = $ this ->getMockBuilder (AbstractWebApplication::class)
535
+ ->setConstructorArgs ([null , null , $ mockClient ])
536
+ ->onlyMethods (['checkHeadersSent ' ])
537
+ ->getMockForAbstractClass ();
538
+
539
+ $ object ->expects ($ this ->once ())
540
+ ->method ('checkHeadersSent ' )
541
+ ->willReturn (true );
535
542
536
543
// Mock a response.
537
544
$ response = new TextResponse (
@@ -738,7 +745,7 @@ public function testRedirectLegacyBehavior()
738
745
$ date = new \DateTime ('now ' , new \DateTimeZone ('GMT ' ));
739
746
$ object ->modifiedDate = $ date ;
740
747
741
- $ object ->redirect ($ url , false );
748
+ $ object ->redirect ($ url , 303 );
742
749
743
750
$ this ->assertSame (
744
751
self ::$ headers ,
@@ -1161,7 +1168,7 @@ public function testRedirectWithMoved()
1161
1168
$ date = new \DateTime ('now ' , new \DateTimeZone ('GMT ' ));
1162
1169
$ object ->modifiedDate = $ date ;
1163
1170
1164
- $ object ->redirect ($ url , true );
1171
+ $ object ->redirect ($ url , 301 );
1165
1172
1166
1173
$ this ->assertSame (
1167
1174
self ::$ headers ,
0 commit comments