Adapt to the interface changes in Kolab_Session.
authorGunnar Wrobel <p@rdus.de>
Thu, 5 Nov 2009 22:38:23 +0000 (23:38 +0100)
committerGunnar Wrobel <p@rdus.de>
Thu, 5 Nov 2009 22:38:23 +0000 (23:38 +0100)
framework/Auth/lib/Horde/Auth/Kolab.php
framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php

index a000b09..de15506 100644 (file)
@@ -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
      */
index 7af6759..8ab00b0 100644 (file)
@@ -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'))
         );
     }