1717use GuzzleHttp \Exception \ServerException ;
1818use GuzzleHttp \Promise \FulfilledPromise ;
1919use GuzzleHttp \Psr7 \Request ;
20+ use PHPUnit \Framework \Attributes \DataProvider ;
2021use Psr \Http \Message \RequestInterface ;
2122use Psr \Http \Message \ResponseInterface ;
2223
@@ -290,6 +291,7 @@ public static function provideDemosStatusAndHtmlResponseCases(): iterable
290291 /**
291292 * @dataProvider provideDemosStatusAndHtmlResponseCases
292293 */
294+ #[DataProvider('provideDemosStatusAndHtmlResponseCases ' )]
293295 public function testDemosStatusAndHtmlResponse (string $ path ): void
294296 {
295297 $ response = $ this ->getResponseFromRequest ($ path );
@@ -322,6 +324,7 @@ public static function provideDemoGetCases(): iterable
322324 /**
323325 * @dataProvider provideDemoGetCases
324326 */
327+ #[DataProvider('provideDemoGetCases ' )]
325328 public function testDemoGet (string $ path ): void
326329 {
327330 $ response = $ this ->getResponseFromRequest ($ path );
@@ -398,6 +401,7 @@ public static function provideDemoJsonResponseCases(): iterable
398401 *
399402 * @dataProvider provideDemoJsonResponseCases
400403 */
404+ #[DataProvider('provideDemoJsonResponseCases ' )]
401405 public function testDemoJsonResponse (string $ path , ?string $ expectedExceptionMessage = null ): void
402406 {
403407 if (static ::class === self ::class) {
@@ -436,6 +440,7 @@ public static function provideDemoSseResponseCases(): iterable
436440 *
437441 * @dataProvider provideDemoSseResponseCases
438442 */
443+ #[DataProvider('provideDemoSseResponseCases ' )]
439444 public function testDemoSseResponse (string $ path ): void
440445 {
441446 // this test requires SessionTrait, more precisely session_start() which we do not support in non-HTTP testing
@@ -476,6 +481,7 @@ public static function provideDemoJsonResponsePostCases(): iterable
476481 /**
477482 * @dataProvider provideDemoJsonResponsePostCases
478483 */
484+ #[DataProvider('provideDemoJsonResponsePostCases ' )]
479485 public function testDemoJsonResponsePost (string $ path , array $ postData ): void
480486 {
481487 $ response = $ this ->getResponseFromRequest ($ path , ['form_params ' => $ postData ]);
@@ -488,6 +494,7 @@ public function testDemoJsonResponsePost(string $path, array $postData): void
488494 *
489495 * @slowThreshold 1500
490496 */
497+ #[DataProvider('provideDemoCallbackErrorCases ' )]
491498 public function testDemoCallbackError (string $ path , string $ expectedExceptionMessage , array $ options = []): void
492499 {
493500 if (static ::class === self ::class) {
0 commit comments