1616use Magento \UrlRewrite \Model \Storage \DbStorage ;
1717use Magento \UrlRewrite \Service \V1 \Data \UrlRewrite ;
1818use Magento \UrlRewrite \Service \V1 \Data \UrlRewriteFactory ;
19+ use PHPUnit \Framework \Attributes \DataProvider ;
1920use PHPUnit \Framework \MockObject \MockObject ;
2021use PHPUnit \Framework \TestCase ;
2122
@@ -620,11 +621,11 @@ public function testDeleteByData(): void
620621 /**
621622 * Test that invalid UTF-8 sequences are rejected to prevent collation errors
622623 *
623- * @dataProvider invalidRequestPathDataProvider
624624 * @param string $requestPath
625625 * @param string $description
626626 * @return void
627627 */
628+ #[DataProvider('invalidRequestPathDataProvider ' )]
628629 public function testFindOneByDataRejectsInvalidUtf8Sequences (string $ requestPath , string $ description ): void
629630 {
630631 $ data = [
@@ -647,11 +648,11 @@ public function testFindOneByDataRejectsInvalidUtf8Sequences(string $requestPath
647648 /**
648649 * Test that valid UTF-8 paths with normal characters work correctly
649650 *
650- * @dataProvider validRequestPathDataProvider
651651 * @param string $requestPath
652652 * @param string $description
653653 * @return void
654654 */
655+ #[DataProvider('validRequestPathDataProvider ' )]
655656 public function testFindOneByDataAcceptsValidUtf8Paths (string $ requestPath , string $ description ): void
656657 {
657658 $ data = [
@@ -682,7 +683,7 @@ public function testFindOneByDataAcceptsValidUtf8Paths(string $requestPath, stri
682683 *
683684 * @return array
684685 */
685- public function invalidRequestPathDataProvider (): array
686+ public static function invalidRequestPathDataProvider (): array
686687 {
687688 return [
688689 // Path traversal attempts with overlong UTF-8 encoding (invalid UTF-8)
@@ -747,7 +748,7 @@ public function invalidRequestPathDataProvider(): array
747748 *
748749 * @return array
749750 */
750- public function validRequestPathDataProvider (): array
751+ public static function validRequestPathDataProvider (): array
751752 {
752753 return [
753754 // Standard ASCII paths
0 commit comments