How did I get the idea to add the group handler here? Sometime I hate my logic.
* @return Horde_Kolab_Storage_Driver_Namespace The initialized namespace handler.
*/
public function getNamespace();
-
- /**
- * Get the group handler for this connection.
- *
- * @return Horde_Group The group handler.
- */
- public function getGroupHandler();
}
\ No newline at end of file
implements Horde_Kolab_Storage_Driver
{
/**
- * The group handler for this connection.
- *
- * @var Horde_Group
- */
- private $_groups;
-
- /**
* Additional connection parameters.
*
* @var array
/**
* Constructor.
*
- * @param Horde_Group $groups The groups handler.
* @param array $params Connection parameters.
*/
- public function __construct(Horde_Group $groups, $params = array())
+ public function __construct($params = array())
{
- $this->_groups = $groups;
$this->_params = $params;
}
}
return new Horde_Kolab_Storage_Driver_Namespace_Fixed();
}
-
- /**
- * Get the group handler for this connection.
- *
- * @return Horde_Group The group handler.
- */
- public function getGroupHandler()
- {
- return $this->_groups;
- }
-
}
\ No newline at end of file
extends Horde_Kolab_Storage_Driver_Base
{
/**
- * The group handler for this connection.
- *
- * @var Horde_Group
- */
- private $_groups;
-
- /**
- * Constructor.
- *
- * @param array $params Connection parameters.
- */
- public function __construct(Horde_Group $groups)
- {
- $this->_groups = $groups;
- }
-
- /**
* Return the id of the user currently authenticated.
*
* @return string The id of the user that opened the IMAP connection.
* Constructor.
*
* @param Horde_Imap_Client_Base $imap The IMAP connection handler.
- * @param Horde_Group $groups The groups handler.
* @param array $params Connection parameters.
*/
public function __construct(
Horde_Imap_Client_Base $imap,
- Horde_Group $groups,
$params = array()
) {
$this->_imap = $imap;
- parent::__construct($groups, $params);
+ parent::__construct($params);
}
/**
*/
public function __construct(
Net_IMAP $imap,
- Horde_Group $groups,
$params = array()
) {
$this->_imap = $imap;
- parent::__construct($groups, $params);
+ parent::__construct($params);
}
/**
{
$this->_storage = $this->getMock('Horde_Kolab_Storage', array(), array(), '', false, false);
$this->_imap = $this->getMock('Horde_Imap_Client_Socket', array(), array(), '', false, false);
- $this->groups = $this->getMock('Horde_Group', array(), array(), '', false, false);
- $this->_connection = new Horde_Kolab_Storage_Driver_Imap($this->_imap, $this->groups);
+ $this->_connection = new Horde_Kolab_Storage_Driver_Imap($this->_imap);
$this->_imap->expects($this->any())
->method('getNamespaces')
->will(
class Horde_Kolab_Storage_Unit_Driver_CclientTest
extends PHPUnit_Framework_TestCase
{
- public function setUp()
- {
- $this->group = new Horde_Group_Mock();
- }
-
public function testGetNamespaceReturnsNamespaceHandler()
{
$driver = new Horde_Kolab_Storage_Driver_Cclient(
- $this->group,
array()
);
$this->assertType(
public function testGetNamespaceReturnsExpectedNamespaces()
{
$driver = new Horde_Kolab_Storage_Driver_Cclient(
- $this->group,
array()
);
$namespaces = array();
class Horde_Kolab_Storage_Unit_Driver_ImapTest
extends PHPUnit_Framework_TestCase
{
- public function setUp()
- {
- $this->group = new Horde_Group_Mock();
- }
-
public function testGetNamespaceReturnsNamespaceHandler()
{
$driver = new Horde_Kolab_Storage_Driver_Imap(
$this->_getNamespaceMock(),
- $this->group,
array()
);
$this->assertType(
{
$driver = new Horde_Kolab_Storage_Driver_Imap(
$this->_getNamespaceMock(),
- $this->group,
array()
);
$namespaces = array();
class Horde_Kolab_Storage_Unit_Driver_MockTest
extends PHPUnit_Framework_TestCase
{
- public function setUp()
- {
- $this->group = new Horde_Group_Mock();
- }
-
public function testGetAnnotationReturnsAnnotationValue()
{
$this->markTestIncomplete();
$data = array();
$data['INBOX/Contacts']['annotations']['/vendor/kolab/folder-type']['value.shared'] = 'contact.default';
$driver = new Horde_Kolab_Storage_Driver_Mock(
- $this->group,
$data
);
$this->assertEquals(
public function testGetNamespaceReturnsNamespaceHandler()
{
$driver = new Horde_Kolab_Storage_Driver_Mock(
- $this->group,
array()
);
$this->assertType(
public function testGetNamespaceReturnsExpectedNamespaces()
{
$driver = new Horde_Kolab_Storage_Driver_Mock(
- $this->group,
array()
);
$namespaces = array();
class Horde_Kolab_Storage_Unit_Driver_PearTest
extends PHPUnit_Framework_TestCase
{
- public function setUp()
- {
- $this->group = new Horde_Group_Mock();
- }
-
public function testGetNamespaceReturnsNamespaceHandler()
{
$driver = new Horde_Kolab_Storage_Driver_Pear(
$this->_getNamespaceMock(),
- $this->group,
array()
);
$this->assertType(
{
$driver = new Horde_Kolab_Storage_Driver_Pear(
$this->_getNamespaceMock(),
- $this->group,
array()
);
$namespaces = array();