30
30
use Phar ;
31
31
use PharFileInfo ;
32
32
use PHPUnit \Framework \Attributes \CoversClass ;
33
+ use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
33
34
use PHPUnit \Framework \Attributes \RunTestsInSeparateProcesses ;
34
35
use Prophecy \Argument ;
35
36
use Prophecy \PhpUnit \ProphecyTrait ;
@@ -1344,9 +1345,7 @@ public function test_it_cannot_compress_if_the_required_extension_is_not_loaded(
1344
1345
}
1345
1346
}
1346
1347
1347
- /**
1348
- * @requires extension zlib
1349
- */
1348
+ #[RequiresPhpExtension('zlib ' )]
1350
1349
public function test_it_compresses_all_the_files_with_the_given_algorithm (): void
1351
1350
{
1352
1351
$ this ->box ->startBuffering ();
@@ -1425,9 +1424,7 @@ public function test_it_compresses_all_the_files_with_the_given_algorithm(): voi
1425
1424
);
1426
1425
}
1427
1426
1428
- /**
1429
- * @requires extension openssl
1430
- */
1427
+ #[RequiresPhpExtension('openssl ' )]
1431
1428
public function test_it_can_sign_the_phar (): void
1432
1429
{
1433
1430
[$ key , $ password ] = $ this ->getPrivateKey ();
@@ -1492,9 +1489,7 @@ public function test_it_cannot_sign_if_cannot_create_the_public_key(): void
1492
1489
}
1493
1490
}
1494
1491
1495
- /**
1496
- * @requires extension openssl
1497
- */
1492
+ #[RequiresPhpExtension('openssl ' )]
1498
1493
public function test_it_can_sign_the_phar_using_a_private_key_with_password (): void
1499
1494
{
1500
1495
$ phar = $ this ->box ->getPhar ();
@@ -1520,9 +1515,7 @@ public function test_it_can_sign_the_phar_using_a_private_key_with_password(): v
1520
1515
);
1521
1516
}
1522
1517
1523
- /**
1524
- * @requires extension openssl
1525
- */
1518
+ #[RequiresPhpExtension('openssl ' )]
1526
1519
public function test_it_cannot_sign_the_phar_using_a_private_key_with_the_wrong_password (): void
1527
1520
{
1528
1521
$ key = $ this ->getPrivateKey ()[0 ];
0 commit comments