@@ -132,10 +132,31 @@ public function testCookies() : void
132132 self ::assertSame (['foo ' , 'baz ' ], \array_keys ($ response ->getCookies ()));
133133 }
134134
135+ /**
136+ * @dataProvider linksProvider
137+ *
138+ * @param string $header
139+ * @param array<string,string> $links
140+ */
141+ public function testLinks (string $ header , array $ links ) : void
142+ {
143+ $ response = new Response (
144+ new Request ('https://domain.tld ' ),
145+ 'HTTP/1.1 ' ,
146+ 200 ,
147+ 'OK ' ,
148+ [
149+ 'link ' => [$ header ],
150+ ],
151+ ''
152+ );
153+ self ::assertSame ($ links , $ response ->getLinks ());
154+ }
155+
135156 /**
136157 * @return array<array<mixed>>
137158 */
138- public function linksProvider () : array
159+ public static function linksProvider () : array
139160 {
140161 return [
141162 [
@@ -179,25 +200,4 @@ public function linksProvider() : array
179200 ],
180201 ];
181202 }
182-
183- /**
184- * @dataProvider linksProvider
185- *
186- * @param string $header
187- * @param array<string,string> $links
188- */
189- public function testLinks (string $ header , array $ links ) : void
190- {
191- $ response = new Response (
192- new Request ('https://domain.tld ' ),
193- 'HTTP/1.1 ' ,
194- 200 ,
195- 'OK ' ,
196- [
197- 'link ' => [$ header ],
198- ],
199- ''
200- );
201- self ::assertSame ($ links , $ response ->getLinks ());
202- }
203203}
0 commit comments