44
55namespace Sabre \HTTP ;
66
7+ use PHPUnit \Framework \Attributes \DataProvider ;
8+ use PHPUnit \Framework \Attributes \Depends ;
9+
710class SapiTest extends \PHPUnit \Framework \TestCase
811{
912 public function testConstructFromServerArray (): void
@@ -144,9 +147,8 @@ public function testSend(): void
144147
145148 /**
146149 * @runInSeparateProcess
147- *
148- * @depends testSend
149150 */
151+ #[Depends('testSend ' )]
150152 public function testSendLimitedByContentLengthString (): void
151153 {
152154 $ response = new Response (200 );
@@ -180,9 +182,8 @@ public function testRecognizeHttp2(): void
180182
181183 /**
182184 * @runInSeparateProcess
183- *
184- * @depends testSend
185185 */
186+ #[Depends('testSend ' )]
186187 public function testSendLimitedByContentLengthStream (): void
187188 {
188189 $ response = new Response (200 , ['Content-Length ' => 19 ]);
@@ -205,17 +206,15 @@ public function testSendLimitedByContentLengthStream(): void
205206
206207 /**
207208 * @runInSeparateProcess
208- *
209- * @depends testSend
210- *
211- * @dataProvider sendContentRangeStreamData
212209 */
210+ #[Depends('testSend ' )]
211+ #[DataProvider('sendContentRangeStreamData ' )]
213212 public function testSendContentRangeStream (
214213 string $ ignoreAtStart ,
215214 string $ sendText ,
216215 int $ multiplier ,
217216 string $ ignoreAtEnd ,
218- ?int $ contentLength ): void
217+ ?int $ contentLength = null ): void
219218 {
220219 $ partial = str_repeat ($ sendText , $ multiplier );
221220 $ ignoreAtStartLength = strlen ($ ignoreAtStart );
@@ -281,9 +280,8 @@ public static function sendContentRangeStreamData(): array
281280
282281 /**
283282 * @runInSeparateProcess
284- *
285- * @depends testSend
286283 */
284+ #[Depends('testSend ' )]
287285 public function testSendWorksWithCallbackAsBody (): void
288286 {
289287 $ response = new Response (200 , [], function (): void {
0 commit comments