2424use HyperfTest \HttpMessage \Stub \Server \RequestStub ;
2525use InvalidArgumentException ;
2626use Mockery ;
27+ use PHPUnit \Framework \Attributes \CoversNothing ;
2728use PHPUnit \Framework \TestCase ;
2829use Psr \Container \ContainerInterface ;
2930use Psr \Http \Message \RequestInterface ;
3435 * @internal
3536 * @coversNothing
3637 */
38+ #[CoversNothing]
3739class ServerRequestTest extends TestCase
3840{
3941 protected function tearDown (): void
@@ -157,9 +159,7 @@ public function testGetUriFromGlobals()
157159 $ this ->assertSame (null , $ uri ->getPort ());
158160 }
159161
160- /**
161- * @group ParseHost
162- */
162+ #[\PHPUnit \Framework \Attributes \Group('ParseHost ' )]
163163 public function testParseHost ()
164164 {
165165 $ hostStrIPv4 = '192.168.119.100:9501 ' ;
@@ -182,11 +182,11 @@ public function testParseHost()
182182 }
183183
184184 /**
185- * @dataProvider getIPv6Examples
186185 * @param mixed $originHost
187186 * @param mixed $host
188187 * @param mixed $port
189188 */
189+ #[\PHPUnit \Framework \Attributes \DataProvider('getIPv6Examples ' )]
190190 public function testGetUriFromGlobalsForIPv6Host ($ originHost , $ host , $ port )
191191 {
192192 $ swooleRequest = Mockery::mock (SwooleRequest::class);
@@ -211,7 +211,7 @@ public function testGetUriFromGlobalsForIPv6Host($originHost, $host, $port)
211211 $ this ->assertSame ($ host , $ uri ->getHost ());
212212 }
213213
214- public function getIPv6Examples (): array
214+ public static function getIPv6Examples (): array
215215 {
216216 return [
217217 ['localhost:9501 ' , 'localhost ' , 9501 ],
0 commit comments