Skip to content

Commit eae3d91

Browse files
committed
Fix test
1 parent c96ed07 commit eae3d91

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<p align="center">
1515
<img alt="GitHub" src="https://img.shields.io/github/license/windwalker-io/crypt?style=flat-square">
16-
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/windwalker-io/crypt/PHP%20Composer?label=test&style=flat-square">
16+
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/windwalker-io/crypt/ci.yml?label=test&style=flat-square">
1717
<img alt="Packagist Downloads" src="https://img.shields.io/packagist/dt/windwalker/crypt?style=flat-square">
1818
<img alt="Packagist Version" src="https://img.shields.io/packagist/v/windwalker/crypt?style=flat-square">
1919
</p>

test/Symmetric/OpensslCipherTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ class OpensslCipherTest extends TestCase
3333
*/
3434
protected $instance;
3535

36+
public static function setUpBeforeClass(): void
37+
{
38+
if (!function_exists('openssl_encrypt')) {
39+
self::markTestSkipped('No openssl installed.');
40+
}
41+
42+
// Openssl 3.0 no longer support legacy unsafe cipher
43+
$version = explode(' ', OPENSSL_VERSION_TEXT)[1] ?? '';
44+
45+
if (version_compare($version, '3.0', '>=')) {
46+
self::markTestSkipped('No-longer support openssl 3.0.');
47+
}
48+
}
49+
3650
/**
3751
* Sets up the fixture, for example, opens a network connection.
3852
* This method is called before a test is executed.

0 commit comments

Comments
 (0)