From: Jan Schneider Date: Tue, 30 Nov 2010 13:31:08 +0000 (+0100) Subject: Fix directory name, remove outdated tests. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e627e6511cc9b3f0d006ef6e5e7b4583a27ec9e1;p=horde.git Fix directory name, remove outdated tests. --- diff --git a/framework/Share/test/Horde/Share/AllTests.php b/framework/Share/test/Horde/Share/AllTests.php new file mode 100644 index 000000000..fac796a69 --- /dev/null +++ b/framework/Share/test/Horde/Share/AllTests.php @@ -0,0 +1,34 @@ + - * @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 index 0fc1fed4c..000000000 --- a/framework/Share/tests/Horde/Share/KolabScenarioTest.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @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 - * @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 index cdd867a68..000000000 --- a/framework/Share/tests/kolab_createdefault.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -Check the Kolab Share handler ---FILE-- -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 index 54821ae1b..000000000 --- a/framework/Share/tests/kolab_list.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Check the Kolab Share handler ---FILE-- -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 index d4809fb29..000000000 --- a/framework/Share/tests/kolab_simple.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Check the Kolab Share handler ---FILE-- - ---EXPECT--