fixing test helper and undoing fubar in class...

This commit is contained in:
Clark Tomlinson 2015-03-31 12:21:30 -04:00 committed by Thomas Müller
parent 48e3864c77
commit ea6b53042d
2 changed files with 4 additions and 5 deletions

View File

@ -54,7 +54,7 @@ class Session {
*/
public function getStatus() {
$status = $this->session->get('encryptionInitialized');
if (!$status) {
if (is_null($status)) {
$status = self::NOT_INITIALIZED;
}
@ -69,8 +69,7 @@ class Session {
*/
public function getPrivateKey() {
$key = $this->session->get('privateKey');
if (!$key) {
if (is_null($key)) {
throw new Exceptions\PrivateKeyMissingException('no private key stored in session');
}
return $key;
@ -83,7 +82,7 @@ class Session {
*/
public function isPrivateKeySet() {
$key = $this->session->get('privateKey');
if (!$key) {
if (is_null($key)) {
return false;
}

View File

@ -104,7 +104,7 @@ class SessionTest extends TestCase {
if (!empty(self::$tempStorage[$key])) {
return self::$tempStorage[$key];
}
return false;
return null;
}
/**