[Security] fixed tests when OpenSSL is not installed
This commit is contained in:
parent
d21584ec68
commit
1f1beb1ceb
@ -154,13 +154,10 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$secureRandoms = array();
|
||||
|
||||
// openssl
|
||||
$secureRandom = new SecureRandom();
|
||||
// only add if openssl is indeed present
|
||||
$secureRandom = new SecureRandom();
|
||||
if ($this->hasOpenSsl($secureRandom)) {
|
||||
$secureRandoms[] = array($secureRandom);
|
||||
} else {
|
||||
$this->markTestSkipped('OpenSSL is not available');
|
||||
}
|
||||
|
||||
// no-openssl with custom seed provider
|
||||
|
@ -319,7 +319,7 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test
|
||||
$userProvider = $this->getProvider();
|
||||
}
|
||||
|
||||
return new PersistentTokenBasedRememberMeServices(array($userProvider), 'fookey', 'fookey', $options, $logger, new SecureRandom());
|
||||
return new PersistentTokenBasedRememberMeServices(array($userProvider), 'fookey', 'fookey', $options, $logger, new SecureRandom(sys_get_temp_dir().'/_sf2.seed'));
|
||||
}
|
||||
|
||||
protected function getProvider()
|
||||
|
Reference in New Issue
Block a user