From 30a3573ec13620fdc0aeb92367c5e76834449b81 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Thu, 5 Nov 2009 23:38:23 +0100 Subject: [PATCH] Adapt to the interface changes in Kolab_Session. --- framework/Auth/lib/Horde/Auth/Kolab.php | 14 +++++++------- framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/framework/Auth/lib/Horde/Auth/Kolab.php b/framework/Auth/lib/Horde/Auth/Kolab.php index a000b0992..de1550634 100644 --- a/framework/Auth/lib/Horde/Auth/Kolab.php +++ b/framework/Auth/lib/Horde/Auth/Kolab.php @@ -19,14 +19,14 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * The session handler. * - * @var Horde_Kolab_Session + * @var Horde_Kolab_Session_Interface */ private $_session; /** * The session factory. * - * @var Horde_Kolab_Session_Factory + * @var Horde_Kolab_Session_Factory_Interface */ private $_factory; @@ -48,11 +48,11 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * Set the session handler. * - * @param Horde_Kolab_Session $session The session handler. + * @param Horde_Kolab_Session_Interface $session The session handler. * * @return NULL */ - public function setSession(Horde_Kolab_Session $session) + public function setSession(Horde_Kolab_Session_Interface $session) { $this->_session = $session; } @@ -60,11 +60,11 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * Set the session factory. * - * @param Horde_Kolab_Session_Factory $factory The session factory. + * @param Horde_Kolab_Session_Factory_Interface $factory The session factory. * * @return NULL */ - public function setSessionFactory(Horde_Kolab_Session_Factory $factory) + public function setSessionFactory(Horde_Kolab_Session_Factory_Interface $factory) { $this->_factory = $factory; } @@ -72,7 +72,7 @@ class Horde_Auth_Kolab extends Horde_Auth_Base /** * Retrieve a connected kolab session. * - * @return Horde_Kolab_Session The connected session. + * @return Horde_Kolab_Session_Interface The connected session. * * @throws Horde_Kolab_Session_Exception */ diff --git a/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php b/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php index 7af675961..8ab00b063 100644 --- a/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php +++ b/framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php @@ -39,8 +39,8 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase $this->markTestSkipped('The PEAR_LOG_DEBUG constant is not available!'); } - $this->session = $this->getMock('Horde_Kolab_Session'); - $this->factory = $this->getMock('Horde_Kolab_Session_Factory'); + $this->session = $this->getMock('Horde_Kolab_Session_Interface'); + $this->factory = $this->getMock('Horde_Kolab_Session_Factory_Interface'); if (!defined('HORDE_BASE')) { define('HORDE_BASE', '/nowhere'); @@ -58,7 +58,7 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase $auth = new Horde_Auth_Kolab(); $auth->setSession($this->session); $this->assertType( - 'Horde_Kolab_Session', + 'Horde_Kolab_Session_Interface', $auth->getSession('user', array('password' => 'test')) ); } @@ -72,7 +72,7 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase ->with('user', array('password' => 'test')) ->will($this->returnValue($this->session)); $this->assertType( - 'Horde_Kolab_Session', + 'Horde_Kolab_Session_Interface', $auth->getSession('user', array('password' => 'test')) ); } -- 2.11.0