Fix directory name, remove outdated tests.
authorJan Schneider <jan@horde.org>
Tue, 30 Nov 2010 13:31:08 +0000 (14:31 +0100)
committerJan Schneider <jan@horde.org>
Tue, 30 Nov 2010 13:50:40 +0000 (14:50 +0100)
framework/Share/test/Horde/Share/AllTests.php [new file with mode: 0644]
framework/Share/tests/Horde/Share/AllTests.php [deleted file]
framework/Share/tests/Horde/Share/KolabScenarioTest.php [deleted file]
framework/Share/tests/kolab_createdefault.phpt [deleted file]
framework/Share/tests/kolab_list.phpt [deleted file]
framework/Share/tests/kolab_simple.phpt [deleted file]

diff --git a/framework/Share/test/Horde/Share/AllTests.php b/framework/Share/test/Horde/Share/AllTests.php
new file mode 100644 (file)
index 0000000..fac796a
--- /dev/null
@@ -0,0 +1,34 @@
+<?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
diff --git a/framework/Share/tests/Horde/Share/AllTests.php b/framework/Share/tests/Horde/Share/AllTests.php
deleted file mode 100644 (file)
index d4a6904..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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
diff --git a/framework/Share/tests/Horde/Share/KolabScenarioTest.php b/framework/Share/tests/Horde/Share/KolabScenarioTest.php
deleted file mode 100644 (file)
index 0fc1fed..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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);
-    }
-}
diff --git a/framework/Share/tests/kolab_createdefault.phpt b/framework/Share/tests/kolab_createdefault.phpt
deleted file mode 100644 (file)
index cdd867a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
---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
diff --git a/framework/Share/tests/kolab_list.phpt b/framework/Share/tests/kolab_list.phpt
deleted file mode 100644 (file)
index 54821ae..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---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
diff --git a/framework/Share/tests/kolab_simple.phpt b/framework/Share/tests/kolab_simple.phpt
deleted file mode 100644 (file)
index d4809fb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---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--