Copyright 2009-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Inheritance: extends Horde_Kolab_Session_Decorator_Base
Example #1
0
 public function testMethodGetidGetsDelegated()
 {
     $session = $this->getMock('Horde_Kolab_Session');
     $session->expects($this->once())->method('getId')->will($this->returnValue('1'));
     $anonymous = new Horde_Kolab_Session_Decorator_Anonymous($session, 'anonymous', 'pass');
     $anonymous->getId();
 }
Example #2
0
 public function testMethodConnectHasPostconditionThatTheConnectionHasBeenEstablishedAsAnonymousUserIfRequired()
 {
     $user = $this->getMock('Horde_Kolab_Server_Object_Hash', array(), array(), '', false, false);
     $user->expects($this->exactly(5))->method('getSingle')->will($this->returnValue('*****@*****.**'));
     $composite = $this->_getMockedComposite();
     $composite->objects->expects($this->once())->method('fetch')->will($this->returnValue($user));
     $session = new Horde_Kolab_Session_Base($composite, array());
     $anonymous = new Horde_Kolab_Session_Decorator_Anonymous($session, 'anonymous', 'pass');
     $anonymous->connect();
     $this->assertEquals('*****@*****.**', $anonymous->getMail());
 }