*/
public function load()
{
- return $this->_session['kolab_session'];
+ return $this->_session->get('horde', 'kolab_session');
}
/**
*/
public function save(Horde_Kolab_Session $session)
{
- $this->_session['kolab_session'] = $session;
+ $this->_session->set('horde', 'kolab_session', $session);
}
}
{
public function testMethodLoadHasResultQueriedObject()
{
- $session = $this->getMock('ArrayAccess', array(), array(), '', false, false);
+ $session = $this->getMock('Horde_Session', array(), array(), '', false, false);
$session->expects($this->once())
- ->method('offsetGet')
- ->with('kolab_session');
+ ->method('get')
+ ->with('horde', 'kolab_session');
$storage = new Horde_Kolab_Session_Storage_Session($session);
$storage->load();
}
public function testMethodSaveHasPostconditionThatTheSessionDataWasSaved()
{
- $session = $this->getMock('ArrayAccess', array(), array(), '', false, false);
+ $session = $this->getMock('Horde_Session', array(), array(), '', false, false);
$session->expects($this->once())
- ->method('offsetSet')
- ->with('kolab_session', $this->isInstanceOf('Horde_Kolab_Session'));
+ ->method('set')
+ ->with('horde', 'kolab_session', $this->isInstanceOf('Horde_Kolab_Session'));
$kolab_session = $this->getMock('Horde_Kolab_Session');
$storage = new Horde_Kolab_Session_Storage_Session($session);
$storage->save($kolab_session);