@@ -34,7 +34,7 @@ abstract class HttpBaseTest extends TestCase
3434 /**
3535 * @var array
3636 */
37- protected static $ defaultHeaders = [
37+ protected $ defaultHeaders = [
3838 'Connection ' => 'close ' ,
3939 'User-Agent ' => 'PHP HTTP Adapter ' ,
4040 'Content-Length ' => '0 ' ,
@@ -59,13 +59,13 @@ public static function tearDownAfterClass(): void
5959 }
6060 }
6161
62- public static function requestProvider (): array
62+ public function requestProvider (): array
6363 {
6464 $ sets = [
65- 'methods ' => self :: getMethods (),
66- 'uris ' => [self :: getUri ()],
67- 'headers ' => self :: getHeaders (),
68- 'body ' => self :: getBodies (),
65+ 'methods ' => $ this -> getMethods (),
66+ 'uris ' => [$ this -> getUri ()],
67+ 'headers ' => $ this -> getHeaders (),
68+ 'body ' => $ this -> getBodies (),
6969 ];
7070
7171 $ cartesianProduct = new CartesianProduct ($ sets );
@@ -82,21 +82,21 @@ public static function requestProvider(): array
8282 });
8383 }
8484
85- public static function requestWithOutcomeProvider (): array
85+ public function requestWithOutcomeProvider (): array
8686 {
8787 $ sets = [
88- 'urisAndOutcomes ' => self :: getUrisAndOutcomes (),
89- 'protocolVersions ' => self :: getProtocolVersions (),
90- 'headers ' => self :: getHeaders (),
91- 'body ' => self :: getBodies (),
88+ 'urisAndOutcomes ' => $ this -> getUrisAndOutcomes (),
89+ 'protocolVersions ' => $ this -> getProtocolVersions (),
90+ 'headers ' => $ this -> getHeaders (),
91+ 'body ' => $ this -> getBodies (),
9292 ];
9393
9494 $ cartesianProduct = new CartesianProduct ($ sets );
9595
9696 return $ cartesianProduct ->compute ();
9797 }
9898
99- private static function getMethods (): array
99+ private function getMethods (): array
100100 {
101101 return [
102102 'GET ' ,
@@ -114,7 +114,7 @@ private static function getMethods(): array
114114 *
115115 * @return string|null
116116 */
117- protected static function getUri (array $ query = [])
117+ protected function getUri (array $ query = [])
118118 {
119119 return !empty ($ query )
120120 ? PHPUnitUtility::getUri ().'? ' .http_build_query ($ query , '' , '& ' )
@@ -132,25 +132,25 @@ protected function getInvalidUri()
132132 /**
133133 * @return array
134134 */
135- private static function getUrisAndOutcomes ()
135+ private function getUrisAndOutcomes ()
136136 {
137137 return [
138138 [
139- self :: getUri (['client_error ' => true ]),
139+ $ this -> getUri (['client_error ' => true ]),
140140 [
141141 'statusCode ' => 400 ,
142142 'reasonPhrase ' => 'Bad Request ' ,
143143 ],
144144 ],
145145 [
146- self :: getUri (['server_error ' => true ]),
146+ $ this -> getUri (['server_error ' => true ]),
147147 [
148148 'statusCode ' => 500 ,
149149 'reasonPhrase ' => 'Internal Server Error ' ,
150150 ],
151151 ],
152152 [
153- self :: getUri (['redirect ' => true ]),
153+ $ this -> getUri (['redirect ' => true ]),
154154 [
155155 'statusCode ' => 302 ,
156156 'reasonPhrase ' => 'Found ' ,
@@ -163,30 +163,30 @@ private static function getUrisAndOutcomes()
163163 /**
164164 * @return array
165165 */
166- private static function getProtocolVersions ()
166+ private function getProtocolVersions ()
167167 {
168168 return ['1.1 ' , '1.0 ' ];
169169 }
170170
171171 /**
172172 * @return string[]
173173 */
174- private static function getHeaders ()
174+ private function getHeaders ()
175175 {
176- $ headers = self :: $ defaultHeaders ;
176+ $ headers = $ this -> defaultHeaders ;
177177 $ headers ['Accept-Charset ' ] = 'utf-8 ' ;
178178 $ headers ['Accept-Language ' ] = 'en ' ;
179179
180180 return [
181- self :: $ defaultHeaders ,
181+ $ this -> defaultHeaders ,
182182 $ headers ,
183183 ];
184184 }
185185
186186 /**
187187 * @return array
188188 */
189- private static function getBodies ()
189+ private function getBodies ()
190190 {
191191 return [
192192 null ,
@@ -197,7 +197,7 @@ private static function getBodies()
197197 /**
198198 * @return array
199199 */
200- private static function getData ()
200+ private function getData ()
201201 {
202202 return ['param1 ' => 'foo ' , 'param2 ' => ['bar ' , ['baz ' ]]];
203203 }
0 commit comments