--- /dev/null
+<?php
+/**
+ * @category Horde
+ * @package Share
+ * @subpackage UnitTests
+ * @copyright 2010 The Horde Project (http://www.horde.org/)
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ */
+
+/**
+ * Define the main method
+ */
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Horde_Share_AllTests::main');
+}
+
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
+
+/**
+ * @package Share
+ * @subpackage UnitTests
+ */
+class Horde_Share_AllTests extends Horde_Test_AllTests
+{
+}
+
+Horde_Share_AllTests::init('Horde_Share', __FILE__);
+
+if (PHPUnit_MAIN_METHOD == 'Horde_Share_AllTests::main') {
+ Horde_Share_AllTests::main();
+}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * All tests for the Horde_Share:: package.
- *
- * PHP version 5
- *
- * @category Horde
- * @package Share
- * @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Share
- */
-
-/**
- * Define the main method
- */
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Share_AllTests::main');
-}
-
-/**
- * Prepare the test setup.
- */
-require_once 'Horde/Test/AllTests.php';
-
-/**
- * @package Horde_Feed
- * @subpackage UnitTests
- */
-class Horde_Share_AllTests extends Horde_Test_AllTests
-{
-}
-
-Horde_Share_AllTests::init('Horde_Share', __FILE__);
-
-if (PHPUnit_MAIN_METHOD == 'Horde_Share_AllTests::main') {
- Horde_Share_AllTests::main();
-}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * Handling Kolab shares.
- *
- * PHP version 5
- *
- * @category Horde
- * @package Share
- * @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Share
- */
-
-/**
- * We need the base class
- */
-return false;
-require_once 'Horde/Kolab/Test/Storage.php';
-
-/**
- * Handling groups.
- *
- * 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_Server
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Server
- */
-class Horde_Share_KolabScenarioTest extends Horde_Kolab_Test_Storage
-{
- /**
- * Test listing shares.
- *
- * @scenario
- *
- * @return NULL
- */
- public function listingShares()
- {
- $this->given('a populated Kolab setup')
- ->when('logging in as a user with a password', 'wrobel', 'none')
- ->and('create a Kolab default calendar with name', "Calendar")
- ->and('retrieving the list of shares for the application', 'kronolith')
- ->then('the login was successful')
- ->and('the creation of the folder was successful')
- ->and('the list contains a share named', 'wrobel@example.org')
- ->and('the list contains a number of elements equal to', 1);
- }
-}
+++ /dev/null
---TEST--
-Check the Kolab Share handler
---FILE--
-<?php
-
-require_once 'Horde/Kolab/Test/Storage.php';
-$test = new Horde_Kolab_Test_Storage();
-
-$world = $test->prepareBasicSetup();
-
-$test->assertTrue($world['auth']->authenticate('wrobel@example.org',
- array('password' => 'none')));
-
-$test->prepareNewFolder($world['storage'], 'Contacts', 'contact', true);
-
-require_once dirname(__FILE__) . '/../Share.php';
-
-$shares = new Horde_Share_Kolab('kronolith');
-
-class Perms_mock
-{
- function &newPermission($name) {
- $perms = array(
- 'users' => array(
- $GLOBALS['registry']->getAuth() => Horde_Perms::SHOW | Horde_Perms::READ |
- Horde_Perms::EDIT | Horde_Perms::DELETE));
- $result = &new Horde_Perms_Permission($name, $perms);
- return $result;
- }
-}
-
-$GLOBALS['perms'] = &new Perms_mock();
-
-$default = $shares->getDefaultShare();
-
-echo $default->getName() . "\n";
-
-$shares = new Horde_Share_Kolab('turba');
-
-$default = $shares->getDefaultShare();
-
-echo $default->get('name') . "\n";
-
-?>
---EXPECT--
-wrobel@example.org
-Contacts
+++ /dev/null
---TEST--
-Check the Kolab Share handler
---FILE--
-<?php
-
-require_once 'Horde/Kolab/Test/Storage.php';
-$test = new Horde_Kolab_Test_Storage();
-
-$world = $test->prepareBasicSetup();
-
-$test->assertTrue($world['auth']->authenticate('wrobel@example.org',
- array('password' => 'none')));
-
-$test->prepareNewFolder($world['storage'], 'Calendar', 'event');
-
-require_once dirname(__FILE__) . '/../Share.php';
-
-$shares = new Horde_Share_Kolab('kronolith');
-
-$keys = array_keys($shares->listShares('wrobel@example.org'));
-foreach ($keys as $key) {
- echo $key . "\n";
-}
-?>
---EXPECT--
-INBOX%2FCalendar
+++ /dev/null
---TEST--
-Check the Kolab Share handler
---FILE--
-<?php
-
-$conf['kolab']['enabled'] = true;
-
-require_once 'PEAR.php';
-
-require_once dirname(__FILE__) . '/../Share.php';
-
-$shares = new Horde_Share_Kolab('test');
-?>
---EXPECT--