fix: #3587982 Modernize unit tests for PHPUnit 12 compatibility
- Modernizes unit tests for PHPUnit 12 compatibility by replacing deprecated patterns:
- Convert @dataProvider annotations to #[DataProvider] attributes with public static methods
- Replace returnValue()/returnValueMap() with willReturn()/willReturnMap()
- Replace getMockForTrait() with anonymous class using the trait
- Remove deprecated @covers annotations
- Convert @group annotations to #[Group] attributes
Closes #3587982