From: Gunnar Wrobel Date: Wed, 9 Sep 2009 08:38:40 +0000 (+0200) Subject: Adapted to the newer Kolab_Storage package. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3414103c09bf737130caf0d353e9adc8189f0ed7;p=horde.git Adapted to the newer Kolab_Storage package. --- diff --git a/framework/Kolab_FreeBusy/lib/Horde/Kolab/Test/FreeBusy.php b/framework/Kolab_FreeBusy/lib/Horde/Kolab/Test/FreeBusy.php index 64c41e504..76d49ef6a 100644 --- a/framework/Kolab_FreeBusy/lib/Horde/Kolab/Test/FreeBusy.php +++ b/framework/Kolab_FreeBusy/lib/Horde/Kolab/Test/FreeBusy.php @@ -45,48 +45,8 @@ class Horde_Kolab_Test_FreeBusy extends Horde_Kolab_Test_Storage public function prepareConfiguration() { $fh = fopen(HORDE_BASE . '/config/conf.php', 'w'); - $data = <<getConfiguration(); + $data .= <<trigger(); @@ -179,7 +139,7 @@ EOD; $_GET['uid'] = $arguments[0]; $_GET['extended'] = '1'; - $fb = &new Horde_Kolab_FreeBusy(); + $fb = new Horde_Kolab_FreeBusy(); $world['result']['fetch'] = $fb->fetch(); diff --git a/framework/Kolab_FreeBusy/test/Horde/Kolab/FreeBusy/FreeBusyTest.php b/framework/Kolab_FreeBusy/test/Horde/Kolab/FreeBusy/FreeBusyTest.php index 98ad0f643..a11495c62 100644 --- a/framework/Kolab_FreeBusy/test/Horde/Kolab/FreeBusy/FreeBusyTest.php +++ b/framework/Kolab_FreeBusy/test/Horde/Kolab/FreeBusy/FreeBusyTest.php @@ -2,7 +2,7 @@ /** * Test the Kolab free/busy system. * - * $Horde: framework/Kolab_FreeBusy/test/Horde/Kolab/FreeBusy/FreeBusyTest.php,v 1.13 2009/06/09 23:23:38 slusarz Exp $ + * PHP version 5 * * @category Kolab * @package Kolab_FreeBusy @@ -12,17 +12,13 @@ */ /** - * We need the base class + * The Autoloader allows us to omit "require/include" statements. */ -require_once 'Horde/Kolab/Test/Storage.php'; - -require_once 'Horde/Kolab/FreeBusy.php'; +require_once 'Horde/Autoloader.php'; /** * Test the Kolab free/busy system. * - * $Horde: framework/Kolab_FreeBusy/test/Horde/Kolab/FreeBusy/FreeBusyTest.php,v 1.13 2009/06/09 23:23:38 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you @@ -71,8 +67,8 @@ class Horde_Kolab_FreeBusy_FreeBusyTest extends Horde_Kolab_Test_FreeBusy { include_once 'Horde/Kolab/Storage.php'; - $folder = Kolab_Storage::getShare('INBOX/Calendar', 'event'); - $data = Kolab_Storage::getData($folder, 'event', 1); + $folder = Horde_Kolab_Storage::getShare('INBOX/Calendar', 'event'); + $data = Horde_Kolab_Storage::getData($folder, 'event', 1); $object = array( 'uid' => 1, 'summary' => 'test', @@ -100,7 +96,7 @@ class Horde_Kolab_FreeBusy_FreeBusyTest extends Horde_Kolab_Test_FreeBusy $_GET['folder'] = 'wrobel@example.org/Calendar'; - $fb = &new Horde_Kolab_FreeBusy(); + $fb = new Horde_Kolab_FreeBusy(); /** Trigger the free/busy cache update */ $view = $fb->trigger(); @@ -125,7 +121,7 @@ class Horde_Kolab_FreeBusy_FreeBusyTest extends Horde_Kolab_Test_FreeBusy $_GET['extended'] = '1'; $req_folder = Horde_Util::getFormData('folder', ''); - $access = &new Horde_Kolab_FreeBusy_Access(); + $access = new Horde_Kolab_FreeBusy_Access(); $result = $access->parseFolder($req_folder); $this->assertEquals('wrobel@example.org', $access->owner); @@ -135,14 +131,14 @@ class Horde_Kolab_FreeBusy_FreeBusyTest extends Horde_Kolab_Test_FreeBusy $result = $this->server->fetch($result, 'Horde_Kolab_Server_Object_Kolab_User'); $this->assertNoError($result); - $fb = &new Horde_Kolab_FreeBusy(); + $fb = new Horde_Kolab_FreeBusy(); $view = $fb->trigger(); $this->assertEquals('Horde_Kolab_FreeBusy_View_vfb', get_class($view)); /** Test triggering an invalid folder */ $_GET['folder'] = ''; - $fb = &new Horde_Kolab_FreeBusy(); + $fb = new Horde_Kolab_FreeBusy(); /** Trigger the free/busy cache update */ $view = $fb->trigger(); @@ -167,7 +163,7 @@ class Horde_Kolab_FreeBusy_FreeBusyTest extends Horde_Kolab_Test_FreeBusy $_GET['folder'] = 'wrobel@example.org/Calendar'; $_GET['extended'] = '1'; - $fb = &new Horde_Kolab_FreeBusy(); + $fb = new Horde_Kolab_FreeBusy(); $view = $fb->trigger(); $this->assertEquals('Horde_Kolab_FreeBusy_View_vfb', get_class($view)); diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Test/Storage.php b/framework/Kolab_Storage/lib/Horde/Kolab/Test/Storage.php index d913510f6..4931f4619 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Test/Storage.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Test/Storage.php @@ -173,14 +173,8 @@ class Horde_Kolab_Test_Storage extends Horde_Kolab_Test_Server $GLOBALS['browser'] = new Horde_Browser(); } - /** - * Prepare the configuration. - * - * @return NULL - */ - public function prepareConfiguration() + protected function getConfiguration() { - $fh = fopen(HORDE_BASE . '/config/conf.php', 'w'); $data = <<getConfiguration(); fwrite($fh, "