Skip to content
Snippets Groups Projects
Commit 4b6190be authored by efalcy's avatar efalcy
Browse files

Correct Numilog link

parent eaa7d818
Branches
Tags
No related merge requests found
......@@ -46,7 +46,10 @@ class Class_NumilogLink extends Class_WebService_Abstract {
}
function getTicket() {
return (new Class_CasTicket())->getTicketForUser($this->_user);
}
function urlExternal($url_external){
if ($this->_user)
......@@ -58,7 +61,7 @@ class Class_NumilogLink extends Class_WebService_Abstract {
function url(){
if ($this->_user)
return $this->getBaseUrl().'?ticket='.(new Class_CasTicket())->getTicketForUser($this->_user);
return $this->getBaseUrl().'?ticket='.$this->getTicket();
else
return $this->getBaseUrl();
}
......
......@@ -67,5 +67,12 @@ abstract class NumilogLinkTestCase extends Storm_Test_ModelTestCase {
$this->_numilog->url());
}
/** @test */
public function numilogUrlExternalShouldReturnUrlWithTicket() {
$this->assertEquals('http://url-given-bynumilog?withparam=2&ticket='.md5( Zend_Session::getId() . '4'),
$this->_numilog->urlExternal('http://url-given-bynumilog?withparam=2'));
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment