public function testStartServiceDoesAutomaticLogin() { $this->setSuccess(); $this->setUserAuthInfo(); $service = new SignatureService(); $service->setWsdl(); $service->initSoap(); $this->assertTrue(is_int($service->startSession($this->testFileName))); }
public function testSigningProcess() { if ($this->getConfig()['signature']['hex'] === null) { $this->markTestSkipped('Test skipped, because no config was found.'); } // login $this->setSuccess(); $this->setUserAuthInfo(); IdCardAuthentication::login(); // start session $service = new SignatureService(); $service->setWsdl(); $service->initSoap(); $sessionCode = $service->startSession($this->testFileName); // prepare $certificateConfig = $this->getConfig()['certificate']; $info = $service->prepareSignature($sessionCode, $certificateConfig['id'], $certificateConfig['hex']); //finalize $info2 = $service->finalizeSignature($sessionCode, $info['SignatureId'], $this->getConfig()['signature']['hex']); }