Skip to content

Commit 3760d98

Browse files
committed
tests: fixed compatibility with PHP 8.0
1 parent 9a87f1b commit 3760d98

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/Security/Passwords.hash().phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Assert::same($hash, crypt('dg', $hash));
2626

2727
Assert::exception(function () {
2828
(new Passwords(PASSWORD_BCRYPT, ['cost' => 3]))->hash('dg');
29-
}, Nette\InvalidStateException::class, 'Computed hash is invalid. password_hash(): Invalid bcrypt cost parameter specified: 3');
29+
}, PHP_VERSION_ID < 80000 ? Nette\InvalidStateException::class : ValueError::class);
3030

3131
Assert::exception(function () {
3232
(new Passwords)->hash('');

tests/Security/Passwords.static.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Security\Passwords deprecated static usage
5+
* @phpVersion < 8
56
*/
67

78
declare(strict_types=1);

0 commit comments

Comments
 (0)