8000 [Security] fixed tests when OpenSSL is not installed · symfony/symfony@1f1beb1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f1beb1

Browse files
committed
[Security] fixed tests when OpenSSL is not installed
1 parent d21584e commit 1f1beb1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/Symfony/Component/Security/Tests/Core/Util/SecureRandomTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,10 @@ public function getSecureRandoms()
154154
{
155155
$secureRandoms = array();
156156

157-
// openssl
158-
$secureRandom = new SecureRandom();
159157
// only add if openssl is indeed present
158+
$secureRandom = new SecureRandom();
160159
if ($this->hasOpenSsl($secureRandom)) {
161160
$secureRandoms[] = array($secureRandom);
162-
} else {
163-
$this->markTestSkipped('OpenSSL is not available');
164161
}
165162

166163
// no-openssl with custom seed provider

src/Symfony/Component/Security/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ protected function getService($userProvider = null, $options = array(), $logger
319319
$userProvider = $this->getProvider();
320320
}
321321

322-
return new PersistentTokenBasedRememberMeServices(array($userProvider), 'fookey', 'fookey', $options, $logger, new SecureRandom());
322+
return new PersistentTokenBasedRememberMeServices(array($userProvider), 'fookey', 'fookey', $options, $logger, new SecureRandom(sys_get_temp_dir().'/_sf2.seed'));
323323
}
324324

325325
protected function getProvider()

0 commit comments

Comments
 (0)
0