Skip to content

Commit 00bf5e1

Browse files
committed
AC-15495: [CE] PHPUnit 12: Upgrade Utility & Support Modules related test cases
1 parent bd3d00b commit 00bf5e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/code/Magento/UrlRewrite/Test/Unit/Model/Storage/DbStorageTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Magento\UrlRewrite\Model\Storage\DbStorage;
1717
use Magento\UrlRewrite\Service\V1\Data\UrlRewrite;
1818
use Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory;
19+
use PHPUnit\Framework\Attributes\DataProvider;
1920
use PHPUnit\Framework\MockObject\MockObject;
2021
use 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

Comments
 (0)