Horde_Kolab_Session_Interface -> Horde_Kolab_Session
authorGunnar Wrobel <p@rdus.de>
Wed, 17 Mar 2010 07:29:52 +0000 (08:29 +0100)
committerGunnar Wrobel <wrobel@temple.(none)>
Wed, 17 Mar 2010 20:23:31 +0000 (21:23 +0100)
24 files changed:
framework/Auth/lib/Horde/Auth/Kolab.php
framework/Auth/test/Horde/Auth/Kolab/Class/KolabTest.php
framework/Core/lib/Horde/Core/Factory/KolabSession.php
framework/Core/test/Horde/Core/Factory/KolabSessionTest.php
framework/Kolab_Session/lib/Horde/Kolab/Session.php [new file with mode: 0644]
framework/Kolab_Session/lib/Horde/Kolab/Session/Base.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Anonymous.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Logged.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Decorator/Stored.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Interface.php [deleted file]
framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Interface.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Mock.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Storage/Sessionobjects.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Base.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Decorator/Logged.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Valid/Interface.php
framework/Kolab_Session/package.xml
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Decorator/AnonymousTest.php
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Decorator/LoggedTest.php
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Decorator/StoredTest.php
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Storage/MockTest.php
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Storage/SessionobjectsTest.php
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Valid/BaseTest.php
framework/Kolab_Session/test/Horde/Kolab/Session/Class/Valid/Decorator/LoggedTest.php

index 8f60222..9d3a094 100644 (file)
@@ -19,7 +19,7 @@ class Horde_Auth_Kolab extends Horde_Auth_Base
     /**
      * The session handler.
      *
-     * @var Horde_Kolab_Session_Interface
+     * @var Horde_Kolab_Session
      */
     private $_session;
 
@@ -48,11 +48,11 @@ class Horde_Auth_Kolab extends Horde_Auth_Base
     /**
      * Set the session handler.
      *
-     * @param Horde_Kolab_Session_Interface $session The session handler.
+     * @param Horde_Kolab_Session $session The session handler.
      *
      * @return NULL
      */
-    public function setSession(Horde_Kolab_Session_Interface $session)
+    public function setSession(Horde_Kolab_Session $session)
     {
         $this->_session = $session;
     }
@@ -72,7 +72,7 @@ class Horde_Auth_Kolab extends Horde_Auth_Base
     /**
      * Retrieve a connected kolab session.
      *
-     * @return Horde_Kolab_Session_Interface The connected session.
+     * @return Horde_Kolab_Session The connected session.
      *
      * @throws Horde_Kolab_Session_Exception
      */
index 7cd618b..c4078d2 100644 (file)
@@ -34,7 +34,7 @@ class Horde_Auth_Kolab_Class_KolabTest extends PHPUnit_Framework_TestCase
 {
     public function setUp()
     {
-        $this->session = $this->getMock('Horde_Kolab_Session_Interface');
+        $this->session = $this->getMock('Horde_Kolab_Session');
         $this->factory = $this->getMock('Horde_Kolab_Session_Factory_Interface');
 
         if (!defined('HORDE_BASE')) {
@@ -53,7 +53,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_Interface',
+            'Horde_Kolab_Session',
             $auth->getSession('user', array('password' => 'test'))
         );
     }
@@ -67,7 +67,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_Interface',
+            'Horde_Kolab_Session',
             $auth->getSession('user', array('password' => 'test'))
         );
     }
index 2b96ad3..85ba2e0 100644 (file)
@@ -118,14 +118,14 @@ class Horde_Core_Factory_KolabSession
     /**
      * Return the session validation driver.
      *
-     * @param Horde_Kolab_Session_Interface      $session The session to validate.
+     * @param Horde_Kolab_Session      $session The session to validate.
      * @param Horde_Kolab_Session_Auth_Interface $auth    The auth handler.
      *
      * @return Horde_Kolab_Session_Valid_Interface The driver for validating
      *                                             sessions.
      */
     public function getSessionValidator(
-        Horde_Kolab_Session_Interface $session,
+        Horde_Kolab_Session $session,
         Horde_Kolab_Session_Auth_Interface $auth
     ) {
         $configuration = $this->_injector->getInstance('Horde_Kolab_Session_Configuration');
@@ -146,12 +146,12 @@ class Horde_Core_Factory_KolabSession
     /**
      * Validate the given session.
      *
-     * @param Horde_Kolab_Session_Interface $session The session to validate.
+     * @param Horde_Kolab_Session $session The session to validate.
      *
      * @return boolean True if the given session is valid.
      */
     public function validate(
-        Horde_Kolab_Session_Interface $session
+        Horde_Kolab_Session $session
     ) {
         return $this->getSessionValidator(
             $session,
index ae0a921..08f79f9 100644 (file)
@@ -47,7 +47,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase
 
     public function testMethodGetvalidatorHasResultHordekolabsessionvalid()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $this->assertType(
             'Horde_Kolab_Session_Valid_Interface',
             $this->_getFactory()->getSessionValidator($session, $this->session_auth)
@@ -60,7 +60,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase
         $this->session_auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue('mail@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
@@ -75,7 +75,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase
     public function testMethodGetsessionHasResultHordekolabsessionTheOldSessionIfAnOldSessionWasStoredAndValid()
     {
         $factory = $this->_getFactory();
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
@@ -91,7 +91,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase
     public function testMethodGetsessionHasResultHordekolabsessionANewSessionIfAnOldSessionWasStoredAndInvalid()
     {
         $factory = $this->_getFactory();
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
@@ -110,7 +110,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase
         $this->session_storage->expects($this->once())
             ->method('load')
             ->will($this->returnValue(false));
-        $this->assertType('Horde_Kolab_Session_Interface', $factory->getSession());
+        $this->assertType('Horde_Kolab_Session', $factory->getSession());
     }
 
 
@@ -135,7 +135,7 @@ class Horde_Core_Factory_KolabSessionTest extends PHPUnit_Framework_TestCase
 
     public function testMethodGetsessionvalidatorHasResultHordekolabsessionvalidloggedIfConfiguredThatWay()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $auth = $this->getMock('Horde_Kolab_Session_Auth_Interface');
         $GLOBALS['conf']['kolab']['session']['log'] = true;
         $this->assertType(
diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session.php b/framework/Kolab_Session/lib/Horde/Kolab/Session.php
new file mode 100644 (file)
index 0000000..9485f7d
--- /dev/null
@@ -0,0 +1,110 @@
+<?php
+/**
+ * The interface describing Horde_Kolab_Session handlers.
+ *
+ * PHP version 5
+ *
+ * @category Kolab
+ * @package  Kolab_Session
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://pear.horde.org/index.php?package=Kolab_Session
+ */
+
+/**
+ * The interface describing Horde_Kolab_Session handlers.
+ *
+ * Horde_Kolab_Server currently has no caching so we mainly cache some core user
+ * information in the Kolab session handler as reading this data is expensive
+ * and it is sufficient to read it once per session.
+ *
+ * The core user credentials (login, pass) are kept within the Auth module and
+ * can be retrieved using <code>Auth::getAuth()</code> respectively
+ * <code>Auth::getCredential('password')</code>. Any additional Kolab user data
+ * relevant for the user session should be accessed via the Horde_Kolab_Session
+ * class.
+ *
+ * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Kolab
+ * @package  Kolab_Session
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://pear.horde.org/index.php?package=Kolab_Session
+ */
+interface Horde_Kolab_Session
+{
+    /**
+     * Try to connect the session handler.
+     *
+     * @param string $user_id     The user ID to connect with.
+     * @param array  $credentials An array of login credentials. For Kolab,
+     *                            this must contain a "password" entry.
+     *
+     * @return NULL
+     *
+     * @throws Horde_Kolab_Session_Exception If the connection failed.
+     */
+    public function connect($user_id = null, array $credentials = null);
+
+    /**
+     * Return the user id used for connecting the session.
+     *
+     * @return string The user id.
+     */
+    public function getId();
+
+    /**
+     * Set the user id used for connecting the session.
+     *
+     * @param string $id The user id.
+     *
+     * @return NULL
+     */
+    public function setId($id);
+
+    /**
+     * Return the users mail address.
+     *
+     * @return string The users mail address.
+     */
+    public function getMail();
+
+    /**
+     * Return the users uid.
+     *
+     * @return string The users uid.
+     */
+    public function getUid();
+
+    /**
+     * Return the users name.
+     *
+     * @return string The users name.
+     */
+    public function getName();
+
+    /**
+     * Return the imap server.
+     *
+     * @return string The imap host for the current user.
+     */
+    public function getImapServer();
+
+    /**
+     * Return the freebusy server.
+     *
+     * @return string The freebusy host for the current user.
+     */
+    public function getFreebusyServer();
+
+    /**
+     * Return a connection to the Kolab storage system.
+     *
+     * @return Horde_Kolab_Storage The storage connection.
+     */
+    public function getStorage();
+}
index 66d5e88..ca5e0fc 100644 (file)
@@ -31,7 +31,7 @@
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
  * @link     http://pear.horde.org/index.php?package=Kolab_Session
  */
-class Horde_Kolab_Session_Base implements Horde_Kolab_Session_Interface
+class Horde_Kolab_Session_Base implements Horde_Kolab_Session
 {
     /**
      * Kolab configuration parameters.
index a1d389b..06c5d36 100644 (file)
  * @link     http://pear.horde.org/index.php?package=Kolab_Session
  */
 class Horde_Kolab_Session_Decorator_Anonymous
-implements Horde_Kolab_Session_Interface
+implements Horde_Kolab_Session
 {
     /**
      * The session handler this instance provides with anonymous access.
      *
-     * @var Horde_Kolab_Session_Interface
+     * @var Horde_Kolab_Session
      */
     private $_session;
 
@@ -60,13 +60,13 @@ implements Horde_Kolab_Session_Interface
     /**
      * Constructor.
      *
-     * @param Horde_Kolab_Session_Interface $session The this instance should provide
-     *                                               anonymous access for.
-     * @param string                        $user    ID of the anonymous user.
-     * @param string                        $pass    Password of the anonymous user.
+     * @param Horde_Kolab_Session $session The this instance should provide
+     *                                     anonymous access for.
+     * @param string              $user    ID of the anonymous user.
+     * @param string              $pass    Password of the anonymous user.
      */
     public function __construct(
-        Horde_Kolab_Session_Interface $session,
+        Horde_Kolab_Session $session,
         $user,
         $pass
     ) {
index 9fa045a..a2a2fb5 100644 (file)
  * @link     http://pear.horde.org/index.php?package=Kolab_Session
  */
 class Horde_Kolab_Session_Decorator_Logged
-implements Horde_Kolab_Session_Interface
+implements Horde_Kolab_Session
 {
     /**
      * The session handler.
      *
-     * @var Horde_Kolab_Session_Interface
+     * @var Horde_Kolab_Session
      */
     private $_session;
 
@@ -48,11 +48,11 @@ implements Horde_Kolab_Session_Interface
      * The provided logger class needs to implement the methods info() and
      * err().
      *
-     * @param Horde_Kolab_Session_Interface $session The session handler.
-     * @param mixed                         $logger  The logger instance.
+     * @param Horde_Kolab_Session $session The session handler.
+     * @param mixed               $logger  The logger instance.
      */
     public function __construct(
-        Horde_Kolab_Session_Interface $session,
+        Horde_Kolab_Session $session,
         $logger
     ) {
         $this->_session = $session;
index 55c1286..b9d7c5e 100644 (file)
  * @link     http://pear.horde.org/index.php?package=Kolab_Session
  */
 class Horde_Kolab_Session_Decorator_Stored
-implements Horde_Kolab_Session_Interface
+implements Horde_Kolab_Session
 {
     /**
      * The session handler.
      *
-     * @var Horde_Kolab_Session_Interface
+     * @var Horde_Kolab_Session
      */
     private $_session;
 
@@ -52,11 +52,11 @@ implements Horde_Kolab_Session_Interface
     /**
      * Constructor.
      *
-     * @param Horde_Kolab_Session_Interface $session The session handler.
-     * @param Horde_Kolab_Session_Storage   $storage Store the session here.
+     * @param Horde_Kolab_Session         $session The session handler.
+     * @param Horde_Kolab_Session_Storage $storage Store the session here.
      */
     public function __construct(
-        Horde_Kolab_Session_Interface $session,
+        Horde_Kolab_Session $session,
         Horde_Kolab_Session_Storage_Interface $storage
     ) {
         $this->_session = $session;
diff --git a/framework/Kolab_Session/lib/Horde/Kolab/Session/Interface.php b/framework/Kolab_Session/lib/Horde/Kolab/Session/Interface.php
deleted file mode 100644 (file)
index 3ece671..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-/**
- * The interface describing Horde_Kolab_Session handlers.
- *
- * PHP version 5
- *
- * @category Kolab
- * @package  Kolab_Session
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Kolab_Session
- */
-
-/**
- * The interface describing Horde_Kolab_Session handlers.
- *
- * Horde_Kolab_Server currently has no caching so we mainly cache some core user
- * information in the Kolab session handler as reading this data is expensive
- * and it is sufficient to read it once per session.
- *
- * The core user credentials (login, pass) are kept within the Auth module and
- * can be retrieved using <code>Auth::getAuth()</code> respectively
- * <code>Auth::getCredential('password')</code>. Any additional Kolab user data
- * relevant for the user session should be accessed via the Horde_Kolab_Session
- * class.
- *
- * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Kolab
- * @package  Kolab_Session
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Kolab_Session
- */
-interface Horde_Kolab_Session_Interface
-{
-    /**
-     * Try to connect the session handler.
-     *
-     * @param string $user_id     The user ID to connect with.
-     * @param array  $credentials An array of login credentials. For Kolab,
-     *                            this must contain a "password" entry.
-     *
-     * @return NULL
-     *
-     * @throws Horde_Kolab_Session_Exception If the connection failed.
-     */
-    public function connect($user_id = null, array $credentials = null);
-
-    /**
-     * Return the user id used for connecting the session.
-     *
-     * @return string The user id.
-     */
-    public function getId();
-
-    /**
-     * Set the user id used for connecting the session.
-     *
-     * @param string $id The user id.
-     *
-     * @return NULL
-     */
-    public function setId($id);
-
-    /**
-     * Return the users mail address.
-     *
-     * @return string The users mail address.
-     */
-    public function getMail();
-
-    /**
-     * Return the users uid.
-     *
-     * @return string The users uid.
-     */
-    public function getUid();
-
-    /**
-     * Return the users name.
-     *
-     * @return string The users name.
-     */
-    public function getName();
-
-    /**
-     * Return the imap server.
-     *
-     * @return string The imap host for the current user.
-     */
-    public function getImapServer();
-
-    /**
-     * Return the freebusy server.
-     *
-     * @return string The freebusy host for the current user.
-     */
-    public function getFreebusyServer();
-
-    /**
-     * Return a connection to the Kolab storage system.
-     *
-     * @return Horde_Kolab_Storage The storage connection.
-     */
-    public function getStorage();
-}
index 1c4a745..e27adb0 100644 (file)
@@ -42,5 +42,5 @@ interface Horde_Kolab_Session_Storage_Interface
      *
      * @return NULL
      */
-    public function save(Horde_Kolab_Session_Interface $session);
+    public function save(Horde_Kolab_Session $session);
 }
index 68985e6..bdaea3f 100644 (file)
@@ -47,11 +47,11 @@ implements Horde_Kolab_Session_Storage_Interface
     /**
      * Save the session information.
      *
-     * @param Horde_Kolab_Session_Interface $session The session information.
+     * @param Horde_Kolab_Session $session The session information.
      *
      * @return NULL
      */
-    public function save(Horde_Kolab_Session_Interface $session)
+    public function save(Horde_Kolab_Session $session)
     {
         $this->session = $session;
     }
index 57c7fc9..80b79cf 100644 (file)
@@ -59,11 +59,11 @@ implements Horde_Kolab_Session_Storage_Interface
     /**
      * Save the session information.
      *
-     * @param Horde_Kolab_Session_Interface $session The session information.
+     * @param Horde_Kolab_Session $session The session information.
      *
      * @return NULL
      */
-    public function save(Horde_Kolab_Session_Interface $session)
+    public function save(Horde_Kolab_Session $session)
     {
         $this->_session_objects->overwrite('kolab_session', $session);
     }
index dbe19de..4b028c1 100644 (file)
@@ -37,7 +37,7 @@ implements Horde_Kolab_Session_Valid_Interface
     /**
      * The session handler this instance provides with anonymous access.
      *
-     * @var Horde_Kolab_Session_Interface
+     * @var Horde_Kolab_Session
      */
     private $_session;
 
@@ -51,12 +51,12 @@ implements Horde_Kolab_Session_Valid_Interface
     /**
      * Constructor.
      *
-     * @param Horde_Kolab_Session_Interface      $session The session that should be
-     *                                                     validated.
+     * @param Horde_Kolab_Session                $session The session that should be
+     *                                                    validated.
      * @param Horde_Kolab_Session_Auth_Interface $auth    The authentication handler.
      */
     public function __construct(
-        Horde_Kolab_Session_Interface $session,
+        Horde_Kolab_Session $session,
         Horde_Kolab_Session_Auth_Interface $auth
     ) {
         $this->_session = $session;
@@ -90,7 +90,7 @@ implements Horde_Kolab_Session_Valid_Interface
     /**
      * Return the session this validator checks.
      *
-     * @return Horde_Kolab_Session_Interface The session checked by this
+     * @return Horde_Kolab_Session The session checked by this
      * validator.
      */
     public function getSession()
index 7baa9ab..d30be05 100644 (file)
@@ -88,7 +88,7 @@ implements Horde_Kolab_Session_Valid_Interface
     /**
      * Return the session this validator checks.
      *
-     * @return Horde_Kolab_Session_Interface The session checked by this
+     * @return Horde_Kolab_Session The session checked by this
      * validator.
      */
     public function getSession()
index b8f0346..7238752 100644 (file)
@@ -47,7 +47,7 @@ interface Horde_Kolab_Session_Valid_Interface
     /**
      * Return the session this validator checks.
      *
-     * @return Horde_Kolab_Session_Interface The session checked by this
+     * @return Horde_Kolab_Session The session checked by this
      * validator.
      */
     public function getSession();
index abfdcbb..fa316b7 100644 (file)
@@ -45,6 +45,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
    <dir name="lib">
     <dir name="Horde">
      <dir name="Kolab">
+      <file name="Session.php" role="php" />
       <dir name="Session">
        <dir name="Auth">
         <file name="Horde.php" role="php" />
@@ -61,7 +62,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
        <dir name="Exception">
         <file name="Badlogin.php" role="php" />
        </dir> <!-- /lib/Horde/Session/Exception -->
-       <file name="Interface.php" role="php" />
        <file name="Singleton.php" role="php" />
        <dir name="Storage">
         <file name="Mock.php" role="php" />
@@ -158,6 +158,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
  </dependencies>
  <phprelease>
   <filelist>
+   <install name="lib/Horde/Kolab/Session.php" as="Horde/Kolab/Session.php" />
    <install name="lib/Horde/Kolab/Session/Auth/Horde.php" as="Horde/Kolab/Session/Auth/Horde.php" />
    <install name="lib/Horde/Kolab/Session/Auth/Interface.php" as="Horde/Kolab/Session/Auth/Interface.php" />
    <install name="lib/Horde/Kolab/Session/Auth/Mock.php" as="Horde/Kolab/Session/Auth/Mock.php" />
@@ -167,7 +168,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
    <install name="lib/Horde/Kolab/Session/Decorator/Anonymous.php" as="Horde/Kolab/Session/Decorator/Anonymous.php" />
    <install name="lib/Horde/Kolab/Session/Decorator/Logged.php" as="Horde/Kolab/Session/Decorator/Logged.php" />
    <install name="lib/Horde/Kolab/Session/Decorator/Stored.php" as="Horde/Kolab/Session/Decorator/Stored.php" />
-   <install name="lib/Horde/Kolab/Session/Interface.php" as="Horde/Kolab/Session/Interface.php" />
    <install name="lib/Horde/Kolab/Session/Singleton.php" as="Horde/Kolab/Session/Singleton.php" />
    <install name="lib/Horde/Kolab/Session/Storage/Interface.php" as="Horde/Kolab/Session/Storage/Interface.php" />
    <install name="lib/Horde/Kolab/Session/Storage/Mock.php" as="Horde/Kolab/Session/Storage/Mock.php" />
index 9c2ff31..223be23 100644 (file)
@@ -35,7 +35,7 @@ extends Horde_Kolab_Session_SessionTestCase
 {
     public function testMethodConnectHasPostconditionThatTheConnectionHasBeenEstablishedAsAnonymousUserIfRequired()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('connect')
             ->with('anonymous', array('password' => 'pass'));
@@ -47,7 +47,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetidReturnsNullIfConnectedUserIsAnonymousUser()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getId')
             ->will($this->returnValue('anonymous'));
@@ -59,7 +59,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodConnectGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('connect')
             ->with(array('password' => 'pass'));
@@ -71,7 +71,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getId')
             ->will($this->returnValue('1'));
@@ -83,7 +83,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodSetidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('setId')
             ->with('1');
@@ -95,7 +95,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetmailGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('1'));
@@ -107,7 +107,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetuidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getUid')
             ->will($this->returnValue('1'));
@@ -119,7 +119,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetnameGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getName')
             ->will($this->returnValue('1'));
@@ -131,7 +131,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetimapserverGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getImapServer')
             ->will($this->returnValue('1'));
@@ -143,7 +143,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetfreebusyserverGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getFreebusyServer')
             ->will($this->returnValue('1'));
@@ -155,7 +155,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetstorageGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getStorage')
             ->will($this->returnValue('1'));
index 9e9f4b9..76148f9 100644 (file)
@@ -42,7 +42,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodConnectHasPostconditionThatASuccessfulConnectionGetsLogged()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('connect')
             ->with(array('password' => 'pass'));
@@ -65,7 +65,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodConnectHasPostconditionThatAnUnsuccessfulConnectionGetsLogged()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('connect')
             ->will($this->throwException(new Horde_Kolab_Session_Exception('Error.')));
@@ -92,7 +92,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodConnectGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('connect')
             ->with(array('password' => 'pass'));
@@ -102,7 +102,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getId')
             ->will($this->returnValue('1'));
@@ -112,7 +112,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodSetidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('setId')
             ->with('1');
@@ -122,7 +122,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetmailGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('1'));
@@ -132,7 +132,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetuidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getUid')
             ->will($this->returnValue('1'));
@@ -142,7 +142,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetnameGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getName')
             ->will($this->returnValue('1'));
@@ -152,7 +152,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetimapserverGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getImapServer')
             ->will($this->returnValue('1'));
@@ -162,7 +162,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetfreebusyserverGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getFreebusyServer')
             ->will($this->returnValue('1'));
@@ -172,7 +172,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetstorageGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getStorage')
             ->will($this->returnValue('1'));
index 2beb55b..59fec16 100644 (file)
@@ -44,15 +44,15 @@ extends Horde_Kolab_Session_SessionTestCase
     {
         $this->storage->expects($this->once())
             ->method('save')
-            ->with($this->isInstanceOf('Horde_Kolab_Session_Interface'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+            ->with($this->isInstanceOf('Horde_Kolab_Session'));
+        $session = $this->getMock('Horde_Kolab_Session');
         $stored = new Horde_Kolab_Session_Decorator_Stored($session, $this->storage);
         $stored = null;
     }
 
     public function testMethodConnectGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('connect')
             ->with(array('password' => 'pass'));
@@ -62,7 +62,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getId')
             ->will($this->returnValue('1'));
@@ -72,7 +72,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodSetidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('setId')
             ->with('1');
@@ -82,7 +82,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetmailGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('1'));
@@ -92,7 +92,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetuidGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getUid')
             ->will($this->returnValue('1'));
@@ -102,7 +102,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetnameGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getName')
             ->will($this->returnValue('1'));
@@ -112,7 +112,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetimapserverGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getImapServer')
             ->will($this->returnValue('1'));
@@ -122,7 +122,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetfreebusyserverGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getFreebusyServer')
             ->will($this->returnValue('1'));
@@ -132,7 +132,7 @@ extends Horde_Kolab_Session_SessionTestCase
 
     public function testMethodGetstorageGetsDelegated()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getStorage')
             ->will($this->returnValue('1'));
index f79547e..ca532aa 100644 (file)
@@ -40,7 +40,7 @@ class Horde_Kolab_Session_Class_Storage_MockTest extends Horde_Kolab_Session_Ses
 
     public function testMethodSaveHasPostconditionThatTheSessionDataWasSaved()
     {
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $storage = new Horde_Kolab_Session_Storage_Mock('test');
         $storage->save($session);
         $this->assertSame($session, $storage->session);
index 5139a9f..92d7dd4 100644 (file)
@@ -47,8 +47,8 @@ class Horde_Kolab_Session_Class_Storage_SessionobjectsTest extends Horde_Kolab_S
         $session_objects = $this->getMock('Horde_SessionObjects', array(), array(), '', false, false);
         $session_objects->expects($this->once())
             ->method('overwrite')
-            ->with('kolab_session', $this->isInstanceOf('Horde_Kolab_Session_Interface'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+            ->with('kolab_session', $this->isInstanceOf('Horde_Kolab_Session'));
+        $session = $this->getMock('Horde_Kolab_Session');
         $storage = new Horde_Kolab_Session_Storage_Sessionobjects($session_objects);
         $storage->save($session);
     }
index 29674d5..910f453 100644 (file)
@@ -38,7 +38,7 @@ class Horde_Kolab_Session_Class_Valid_BaseTest extends Horde_Kolab_Session_Sessi
         $auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue(''));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue(''));
@@ -52,7 +52,7 @@ class Horde_Kolab_Session_Class_Valid_BaseTest extends Horde_Kolab_Session_Sessi
         $auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue('mail@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue(''));
@@ -66,7 +66,7 @@ class Horde_Kolab_Session_Class_Valid_BaseTest extends Horde_Kolab_Session_Sessi
         $auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue('somebody@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
@@ -80,7 +80,7 @@ class Horde_Kolab_Session_Class_Valid_BaseTest extends Horde_Kolab_Session_Sessi
         $auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue('mail@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
@@ -94,7 +94,7 @@ class Horde_Kolab_Session_Class_Valid_BaseTest extends Horde_Kolab_Session_Sessi
         $auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue('mail@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
@@ -108,7 +108,7 @@ class Horde_Kolab_Session_Class_Valid_BaseTest extends Horde_Kolab_Session_Sessi
         $auth->expects($this->once())
             ->method('getCurrentUser')
             ->will($this->returnValue('mail@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->once())
             ->method('getMail')
             ->will($this->returnValue('mail@example.org'));
index 391174d..b496fb1 100644 (file)
@@ -46,7 +46,7 @@ extends Horde_Kolab_Session_SessionTestCase
         $auth->expects($this->exactly(2))
             ->method('getCurrentUser')
             ->will($this->returnValue('auth@example.org'));
-        $session = $this->getMock('Horde_Kolab_Session_Interface');
+        $session = $this->getMock('Horde_Kolab_Session');
         $session->expects($this->exactly(2))
             ->method('getMail')
             ->will($this->returnValue('somebody@example.org'));