Skip to content

Commit fa80622

Browse files
Add tests
1 parent b5117a8 commit fa80622

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php // lint < 8.0
2+
3+
namespace Bug13692Php74;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
class Foo
8+
{
9+
10+
public function doFoo()
11+
{
12+
assertType('false', openssl_cipher_iv_length('aes-128-cbc-cts'));
13+
14+
// These should still work correctly
15+
assertType('int', openssl_cipher_iv_length('aes-128-cbc'));
16+
assertType('false', openssl_cipher_iv_length('unknown'));
17+
}
18+
19+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php // lint >= 8.5
2+
3+
namespace Bug13692Php85;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
class Foo
8+
{
9+
10+
public function doFoo()
11+
{
12+
assertType('int', openssl_cipher_iv_length('aes-128-cbc-cts'));
13+
assertType('int', openssl_cipher_iv_length('aes-128-cbc'));
14+
assertType('false', openssl_cipher_iv_length('unknown'));
15+
}
16+
17+
}

0 commit comments

Comments
 (0)