diff options
Diffstat (limited to 'tests/lib/Net/IpAddressClassifierTest.php')
-rw-r--r-- | tests/lib/Net/IpAddressClassifierTest.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/lib/Net/IpAddressClassifierTest.php b/tests/lib/Net/IpAddressClassifierTest.php index 803be00f740..f20e1ec1785 100644 --- a/tests/lib/Net/IpAddressClassifierTest.php +++ b/tests/lib/Net/IpAddressClassifierTest.php @@ -21,7 +21,7 @@ class IpAddressClassifierTest extends TestCase { $this->classifier = new IpAddressClassifier(); } - public function publicIpAddressData(): array { + public static function publicIpAddressData(): array { return [ ['8.8.8.8'], ['8.8.4.4'], @@ -30,16 +30,14 @@ class IpAddressClassifierTest extends TestCase { ]; } - /** - * @dataProvider publicIpAddressData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('publicIpAddressData')] public function testPublicAddress(string $ip): void { $isLocal = $this->classifier->isLocalAddress($ip); self::assertFalse($isLocal); } - public function localIpAddressData(): array { + public static function localIpAddressData(): array { return [ ['192.168.0.1'], ['fe80::200:5aee:feaa:20a2'], @@ -54,9 +52,7 @@ class IpAddressClassifierTest extends TestCase { ]; } - /** - * @dataProvider localIpAddressData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localIpAddressData')] public function testLocalAddress(string $ip): void { $isLocal = $this->classifier->isLocalAddress($ip); |