diff options
Diffstat (limited to 'tests/lib/Net/HostnameClassifierTest.php')
-rw-r--r-- | tests/lib/Net/HostnameClassifierTest.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/lib/Net/HostnameClassifierTest.php b/tests/lib/Net/HostnameClassifierTest.php index 766246ed8ad..c03afdabe83 100644 --- a/tests/lib/Net/HostnameClassifierTest.php +++ b/tests/lib/Net/HostnameClassifierTest.php @@ -21,7 +21,7 @@ class HostnameClassifierTest extends TestCase { $this->classifier = new HostnameClassifier(); } - public function localHostnamesData():array { + public static function localHostnamesData(): array { return [ ['localhost'], ['localHost'], @@ -32,16 +32,14 @@ class HostnameClassifierTest extends TestCase { ]; } - /** - * @dataProvider localHostnamesData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('localHostnamesData')] public function testLocalHostname(string $host): void { $isLocal = $this->classifier->isLocalHostname($host); self::assertTrue($isLocal); } - public function publicHostnamesData(): array { + public static function publicHostnamesData(): array { return [ ['example.com'], ['example.net'], @@ -51,9 +49,7 @@ class HostnameClassifierTest extends TestCase { ]; } - /** - * @dataProvider publicHostnamesData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('publicHostnamesData')] public function testPublicHostname(string $host): void { $isLocal = $this->classifier->isLocalHostname($host); |