fixing test helper and undoing fubar in class...
This commit is contained in:
parent
48e3864c77
commit
ea6b53042d
|
@ -54,7 +54,7 @@ class Session {
|
||||||
*/
|
*/
|
||||||
public function getStatus() {
|
public function getStatus() {
|
||||||
$status = $this->session->get('encryptionInitialized');
|
$status = $this->session->get('encryptionInitialized');
|
||||||
if (!$status) {
|
if (is_null($status)) {
|
||||||
$status = self::NOT_INITIALIZED;
|
$status = self::NOT_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +69,7 @@ class Session {
|
||||||
*/
|
*/
|
||||||
public function getPrivateKey() {
|
public function getPrivateKey() {
|
||||||
$key = $this->session->get('privateKey');
|
$key = $this->session->get('privateKey');
|
||||||
|
if (is_null($key)) {
|
||||||
if (!$key) {
|
|
||||||
throw new Exceptions\PrivateKeyMissingException('no private key stored in session');
|
throw new Exceptions\PrivateKeyMissingException('no private key stored in session');
|
||||||
}
|
}
|
||||||
return $key;
|
return $key;
|
||||||
|
@ -83,7 +82,7 @@ class Session {
|
||||||
*/
|
*/
|
||||||
public function isPrivateKeySet() {
|
public function isPrivateKeySet() {
|
||||||
$key = $this->session->get('privateKey');
|
$key = $this->session->get('privateKey');
|
||||||
if (!$key) {
|
if (is_null($key)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ class SessionTest extends TestCase {
|
||||||
if (!empty(self::$tempStorage[$key])) {
|
if (!empty(self::$tempStorage[$key])) {
|
||||||
return self::$tempStorage[$key];
|
return self::$tempStorage[$key];
|
||||||
}
|
}
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue