public function testIsUserLoggedIn() { $this->assertFalse(IdCardAuthentication::isUserLoggedIn()); $this->setSuccess(); $this->setUserAuthInfo(); IdCardAuthentication::login(); $this->assertTrue(IdCardAuthentication::isUserLoggedIn()); }
public function startDdockSession($documentPath, $storePath) { if (!IdCardAuthentication::isUserLoggedIn()) { IdCardAuthentication::login(); } try { $contents = file_get_contents($documentPath); $contents = $this->prepareDdocDataFile($contents, $storePath); $result = $this->soap->startSession("", $contents, true)['Sesscode']; if (is_int($result)) { return $result; } else { throw new SigningException($result['Status']); } } catch (\SoapFault $e) { $this->catchSoapError($e); } }