From: Gunnar Wrobel
Date: Mon, 30 Mar 2009 06:27:37 +0000 (+0000)
Subject: Adapt the test class to the new return value of the search operation.
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=603da55b9b78839aa8d790d6c53e33350e438f97;p=horde.git
Adapt the test class to the new return value of the search operation.
---
diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Test.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Test.php
index 8f907b844..8406258db 100644
--- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Test.php
+++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Test.php
@@ -348,7 +348,8 @@ class Horde_Kolab_Server_Test extends Horde_Kolab_Server_Ldap
}
$result = $this->doSearch($filter, $attributes);
if (empty($result)) {
- return null;
+ $search = new Horde_Kolab_Server_Test_Search(null);
+ return $search;
}
if ($base) {
$subtree = array();
@@ -359,7 +360,8 @@ class Horde_Kolab_Server_Test extends Horde_Kolab_Server_Ldap
}
$result = $subtree;
}
- return $this->getEntries($result);
+ $search = new Horde_Kolab_Server_Test_Search($this->getEntries($result));
+ return $search;
}
/**
diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Test/Search.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Test/Search.php
new file mode 100644
index 000000000..d5af8733d
--- /dev/null
+++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Test/Search.php
@@ -0,0 +1,57 @@
+
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Kolab_Server
+ */
+
+/**
+ * A class for simulating a Kolab user database search result.
+ *
+ * Copyright 2009 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