From: Gunnar Wrobel
Date: Tue, 3 Nov 2009 14:19:59 +0000 (+0100) Subject: Adapt to Kolab_Server interface changes. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cfb6433d649687e426181162b1ff503e93bcc2f2;p=horde.git Adapt to Kolab_Server interface changes. --- diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Factory.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Factory.php index da6ef99a0..aff902f15 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Factory.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Factory.php @@ -42,7 +42,7 @@ class Horde_Kolab_Server_Object_Factory */ static public function factory( $type, $uid, - Horde_Kolab_Server_Composite $storage, + Horde_Kolab_Server_Composite_Interface $storage, $data = null ) { if (class_exists($type)) { diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictgroups.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictgroups.php index 942727aad..bdd083a76 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictgroups.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictgroups.php @@ -38,7 +38,7 @@ extends Horde_Kolab_Server_Search_Operation_Guid * @throws Horde_Kolab_Server_Exception */ public function searchRestrictGroups( - Horde_Kolab_Server_Query_Element $criteria + Horde_Kolab_Server_Query_Element_Interface $criteria ) { $criteria = new Horde_Kolab_Server_Query_Element_And( array( diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictkolab.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictkolab.php index f60f2a6e8..470ec0c14 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictkolab.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Search/Operation/Restrictkolab.php @@ -38,7 +38,7 @@ extends Horde_Kolab_Server_Search_Operation_Guid * @throws Horde_Kolab_Server_Exception */ public function searchRestrictKolab( - Horde_Kolab_Server_Query_Element $criteria + Horde_Kolab_Server_Query_Element_Interface $criteria ) { $criteria = new Horde_Kolab_Server_Query_Element_And( array( diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php index 1ebe6f5c2..839c7066e 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php @@ -114,7 +114,7 @@ class Horde_Kolab_Session_Base implements Horde_Kolab_Session */ public function __construct( $user_id, - Horde_Kolab_Server_Composite $server, + Horde_Kolab_Server_Composite_Interface $server, array $params ) { $this->_user_id = $user_id; @@ -161,8 +161,9 @@ class Horde_Kolab_Session_Base implements Horde_Kolab_Session * * @return NULL */ - private function _initMail(Horde_Kolab_Server_Object $user) - { + private function _initMail( + Horde_Kolab_Server_Object_Interface $user + ) { try { $this->_user_mail = $user->getExternal('Mail'); } catch (Horde_Kolab_Server_Exception_Novalue $e) { @@ -177,8 +178,9 @@ class Horde_Kolab_Session_Base implements Horde_Kolab_Session * * @return NULL */ - private function _initUid(Horde_Kolab_Server_Object $user) - { + private function _initUid( + Horde_Kolab_Server_Object_Interface $user + ) { try { $this->_user_uid = $user->getExternal('Uid'); } catch (Horde_Kolab_Server_Exception_Novalue $e) { @@ -193,8 +195,9 @@ class Horde_Kolab_Session_Base implements Horde_Kolab_Session * * @return NULL */ - private function _initName(Horde_Kolab_Server_Object $user) - { + private function _initName( + Horde_Kolab_Server_Object_Interface $user + ) { try { $this->_user_name = $user->getExternal('Fnln'); } catch (Horde_Kolab_Server_Exception_Novalue $e) { @@ -209,8 +212,9 @@ class Horde_Kolab_Session_Base implements Horde_Kolab_Session * * @return NULL */ - private function _initImapServer(Horde_Kolab_Server_Object $user) - { + private function _initImapServer( + Horde_Kolab_Server_Object_Interface $user + ) { try { $this->_imap_server = $user->getExternal('KolabHomeserver'); } catch (Horde_Kolab_Server_Exception_Novalue $e) { @@ -229,8 +233,9 @@ class Horde_Kolab_Session_Base implements Horde_Kolab_Session * * @return NULL */ - private function _initFreebusyServer(Horde_Kolab_Server_Object $user) - { + private function _initFreebusyServer( + Horde_Kolab_Server_Object_Interface $user + ) { try { $fb_server = $user->getExternal('KolabFreebusyHost'); } catch (Horde_Kolab_Server_Exception_Novalue $e) { diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Constructor.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Constructor.php index cda221e63..df50a24b5 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Constructor.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Constructor.php @@ -69,7 +69,7 @@ extends Horde_Kolab_Session_Factory_Base * session. */ public function __construct( - Horde_Kolab_Server_Composite $server, + Horde_Kolab_Server_Composite_Interface $server, Horde_Kolab_Session_Auth $auth, array $config, Horde_Kolab_Session_Storage $storage diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Default.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Default.php index 5c6d36526..975a3336e 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Default.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Default.php @@ -52,7 +52,7 @@ extends Horde_Kolab_Session_Factory_Base */ public function __construct( array $config, - Horde_Kolab_Server_Factory $factory + Horde_Kolab_Server_Factory_Interface $factory ) { $this->_configuration = $config; $this->_server_factory = $factory; diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Injector.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Injector.php index 927ba2459..3b56776cb 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Injector.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Factory/Injector.php @@ -136,7 +136,7 @@ extends Horde_Kolab_Session_Factory_Base Horde_Injector $injector ) { Horde_Kolab_Server_Factory_Injector::setup( - 'Horde_Kolab_Server_Factory_Conn_Mock', + 'Horde_Kolab_Server_Factory_Connection_Mock', array('basedn' => ''), $injector ); @@ -151,7 +151,7 @@ extends Horde_Kolab_Session_Factory_Base */ public function getServer() { - return $this->_injector->getInstance('Horde_Kolab_Server_Composite'); + return $this->_injector->getInstance('Horde_Kolab_Server_Composite_Interface'); } /** diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Singleton.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Singleton.php index e060043ba..72d0654a2 100644 --- a/framework/Kolab_Session/lib/Horde/Kolab/Session/Singleton.php +++ b/framework/Kolab_Session/lib/Horde/Kolab/Session/Singleton.php @@ -60,6 +60,7 @@ class Horde_Kolab_Session_Singleton $config['logger'] = Horde::getLogger(); $factory = new Horde_Kolab_Session_Factory_Configuration($config); self::$_instance = $factory->getSession($user); + self::$_instance->connect($credentials); } return self::$_instance; } diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/BaseTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/BaseTest.php index 823f0c23c..25cb3b0ba 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/BaseTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/BaseTest.php @@ -55,7 +55,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectHasParameterArrayCredentials() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $composite = $this->_getMockedComposite(); $composite->objects->expects($this->once()) ->method('fetch') @@ -68,7 +68,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectHasPostconditionThatTheUserMailAddressIsKnown() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('mail@example.org')); @@ -85,7 +85,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectHasPostconditionThatTheUserUidIsKnown() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('uid')); @@ -102,7 +102,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectHasPostconditionThatTheUserNameIsKnown() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('name')); @@ -119,7 +119,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectHasPostconditionThatTheUsersImapHostIsKnown() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('home.example.org')); @@ -136,7 +136,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectHasPostconditionThatTheUsersFreebusyHostIsKnown() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('freebusy.example.org')); @@ -166,7 +166,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodConnectThrowsExceptionIfTheConnectionFailed() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $composite = $this->_getMockedComposite(); $composite->server->expects($this->exactly(1)) ->method('connectGuid') @@ -210,7 +210,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetmailHasResultStringTheMailOfTheConnectedUser() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -227,7 +227,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetuidHasResultStringTheUidOfTheConnectedUser() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -244,7 +244,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetnameHasResultStringTheNameOfTheConnectedUser() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -261,7 +261,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringTheUsersFreebusyServerConverterdToACompleteUrlUsingParametersIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('freebusy.example.org')); @@ -279,7 +279,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringTheUsersFreebusyServerConverterdToACompleteUrlUsingFreebusyIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('freebusy.example.org')); @@ -296,7 +296,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringTheConfiguredServerIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -314,7 +314,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringTheUsersHomeServerConverterdToACompleteUrlUsingParametersIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -332,7 +332,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringTheUsersHomeServerConverterdToACompleteUrlUsingFreebusyIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -349,7 +349,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringLocalhostConvertedToACompleteUrlUsingParametersIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -367,7 +367,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetfreebusyserverHasResultStringLocalhostConvertedToACompleteUrlUsingFreebusy() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -384,7 +384,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetimapserverHasResultStringTheUsersHomeServerIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('home.example.org')); @@ -401,7 +401,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetimapserverHasResultStringTheConfiguredServerIfAvailable() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); @@ -419,7 +419,7 @@ class Horde_Kolab_Session_Class_BaseTest extends Horde_Kolab_Session_SessionTest public function testMethodGetimapserverHasResultStringLocalhostIfNoAlternative() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->throwException(new Horde_Kolab_Server_Exception_Novalue())); diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConfigurationTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConfigurationTest.php index 7a656100e..a7a33b650 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConfigurationTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConfigurationTest.php @@ -116,7 +116,7 @@ class Horde_Kolab_Session_Class_Factory_ConfigurationTest extends Horde_Kolab_Se ) ); $this->assertType( - 'Horde_Kolab_Server_Composite', + 'Horde_Kolab_Server_Composite_Interface', $factory->getServer() ); } diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConstructorTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConstructorTest.php index f7ff42906..d80a0354c 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConstructorTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/ConstructorTest.php @@ -43,7 +43,7 @@ class Horde_Kolab_Session_Class_Factory_ConstructorTest extends Horde_Kolab_Sess $factory = new Horde_Kolab_Session_Factory_Constructor( $this->server, $this->session_auth, array(), $this->session_storage ); - $this->assertType('Horde_Kolab_Server_Composite', $factory->getServer()); + $this->assertType('Horde_Kolab_Server_Composite_Interface', $factory->getServer()); } public function testMethodGetsessionauthHasResultHordekolabsessionauth() diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/DefaultTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/DefaultTest.php index a2fc27dac..c22d8926d 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/DefaultTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/DefaultTest.php @@ -34,10 +34,8 @@ class Horde_Kolab_Session_Class_Factory_DefaultTest extends Horde_Kolab_Session_ { public function testMethodGetserverHasResultHordekolabserver() { - $server = $this->getMock( - 'Horde_Kolab_Server_Composite', array(), array(), '', false, false - ); - $server_factory = $this->getMock('Horde_Kolab_Server_Factory'); + $server = $this->getMock('Horde_Kolab_Server_Composite_Interface'); + $server_factory = $this->getMock('Horde_Kolab_Server_Factory_Interface'); $server_factory->expects($this->once()) ->method('getComposite') ->will($this->returnValue($server)); @@ -45,14 +43,16 @@ class Horde_Kolab_Session_Class_Factory_DefaultTest extends Horde_Kolab_Session_ array('server' => array()), $server_factory ); - $this->assertType('Horde_Kolab_Server_Composite', $factory->getServer()); + $this->assertType( + 'Horde_Kolab_Server_Composite_Interface', $factory->getServer() + ); } public function testMethodGetsessionauthHasResultHordekolabsessionauth() { $factory = new Horde_Kolab_Session_Factory_Default( array('server' => array()), - $this->getMock('Horde_Kolab_Server_Factory') + $this->getMock('Horde_Kolab_Server_Factory_Interface') ); $this->assertType('Horde_Kolab_Session_Auth', $factory->getSessionAuth()); } @@ -61,7 +61,7 @@ class Horde_Kolab_Session_Class_Factory_DefaultTest extends Horde_Kolab_Session_ { $factory = new Horde_Kolab_Session_Factory_Default( array('server' => array()), - $this->getMock('Horde_Kolab_Server_Factory') + $this->getMock('Horde_Kolab_Server_Factory_Interface') ); $this->assertType('array', $factory->getSessionConfiguration()); } @@ -70,7 +70,7 @@ class Horde_Kolab_Session_Class_Factory_DefaultTest extends Horde_Kolab_Session_ { $factory = new Horde_Kolab_Session_Factory_Default( array('server' => array()), - $this->getMock('Horde_Kolab_Server_Factory') + $this->getMock('Horde_Kolab_Server_Factory_Interface') ); $this->assertType('Horde_Kolab_Session_Storage', $factory->getSessionStorage()); } diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/InjectorTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/InjectorTest.php index a5fab4a9c..24dab3fd6 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/InjectorTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Class/Factory/InjectorTest.php @@ -43,7 +43,7 @@ class Horde_Kolab_Session_Class_Factory_InjectorTest extends Horde_Kolab_Session $factory = new Horde_Kolab_Session_Factory_Injector( array('server' => array()), $this->injector ); - $this->assertType('Horde_Kolab_Server_Composite', $factory->getServer()); + $this->assertType('Horde_Kolab_Server_Composite_Interface', $factory->getServer()); } public function testMethodGetsessionauthHasResultHordekolabsessionauth() diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/AnonymousTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/AnonymousTest.php index bcd0a59b8..e53fa99bd 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/AnonymousTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/AnonymousTest.php @@ -36,7 +36,7 @@ class Horde_Kolab_Session_Integration_AnonymousTest extends Horde_Kolab_Session_ { public function testMethodConnectHasPostconditionThatTheConnectionHasBeenEstablishedAsAnonymousUserIfRequired() { - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('anonymous@example.org')); diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/ValidTest.php b/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/ValidTest.php index 2b2379e28..5faee9a64 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/ValidTest.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/Integration/ValidTest.php @@ -66,7 +66,7 @@ class Horde_Kolab_Session_Integration_ValidTest extends Horde_Kolab_Session_Sess $auth->expects($this->once()) ->method('getCurrentUser') ->will($this->returnValue('somebody@example.org')); - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('mail@example.org')); @@ -88,7 +88,7 @@ class Horde_Kolab_Session_Integration_ValidTest extends Horde_Kolab_Session_Sess $auth->expects($this->once()) ->method('getCurrentUser') ->will($this->returnValue('mail@example.org')); - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('mail@example.org')); @@ -110,7 +110,7 @@ class Horde_Kolab_Session_Integration_ValidTest extends Horde_Kolab_Session_Sess $auth->expects($this->once()) ->method('getCurrentUser') ->will($this->returnValue('mail@example.org')); - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('mail@example.org')); @@ -132,7 +132,7 @@ class Horde_Kolab_Session_Integration_ValidTest extends Horde_Kolab_Session_Sess $auth->expects($this->once()) ->method('getCurrentUser') ->will($this->returnValue('mail@example.org')); - $user = $this->getMock('Horde_Kolab_Server_Object'); + $user = $this->getMock('Horde_Kolab_Server_Object_Interface'); $user->expects($this->exactly(5)) ->method('getExternal') ->will($this->returnValue('mail@example.org')); diff --git a/framework/Kolab_Session/test/Horde/Kolab/Session/SessionTestCase.php b/framework/Kolab_Session/test/Horde/Kolab/Session/SessionTestCase.php index c1ee30ebd..c74404f09 100644 --- a/framework/Kolab_Session/test/Horde/Kolab/Session/SessionTestCase.php +++ b/framework/Kolab_Session/test/Horde/Kolab/Session/SessionTestCase.php @@ -29,19 +29,17 @@ class Horde_Kolab_Session_SessionTestCase extends PHPUnit_Framework_TestCase { protected function _getComposite() { - return $this->getMock( - 'Horde_Kolab_Server_Composite', array(), array(), '', false, false - ); + return $this->getMock('Horde_Kolab_Server_Composite_Interface'); } protected function _getMockedComposite() { - return new Horde_Kolab_Server_Composite( - $this->getMock('Horde_Kolab_Server'), - $this->getMock('Horde_Kolab_Server_Objects'), + return new Horde_Kolab_Server_Composite_Base( + $this->getMock('Horde_Kolab_Server_Interface'), + $this->getMock('Horde_Kolab_Server_Objects_Interface'), $this->getMock('Horde_Kolab_Server_Structure_Interface'), $this->getMock('Horde_Kolab_Server_Search_Interface'), - $this->getMock('Horde_Kolab_Server_Schema') + $this->getMock('Horde_Kolab_Server_Schema_Interface') ); }