Put the stub into a separate "Stub" directory as it is useful even if not extending...
authorGunnar Wrobel <p@rdus.de>
Thu, 13 Jan 2011 15:24:11 +0000 (16:24 +0100)
committerGunnar Wrobel <p@rdus.de>
Thu, 13 Jan 2011 15:24:11 +0000 (16:24 +0100)
framework/Share/test/Horde/Share/Autoload.php
framework/Share/test/Horde/Share/Base.php
framework/Share/test/Horde/Share/Stub/Group.php [new file with mode: 0644]

index 3a933ce..bccaf5f 100644 (file)
@@ -20,3 +20,6 @@ require_once 'Horde/Test/Autoload.php';
 
 /* Catch strict standards */
 error_reporting(E_ALL | E_STRICT);
+
+/** Load stub definitions */
+require_once dirname(__FILE__) . '/Stub/Group.php';
index 77a029d..6abd47e 100644 (file)
@@ -405,24 +405,4 @@ class Horde_Share_Test_Base extends Horde_Test_Case
         $share->setShareOb(new Horde_Support_Stub());
         $this->assertEquals($share, unserialize(serialize($share)));
     }
-}
-
-class Horde_Group_Test extends Horde_Group {
-    public function __construct()
-    {
-    }
-
-    public function __wakeup()
-    {
-    }
-
-    public function userIsInGroup($user, $gid, $subgroups = true)
-    {
-        return $user == 'john' && $gid == 'mygroup';
-    }
-
-    public function getGroupMemberships($user, $parentGroups = false)
-    {
-        return $user == 'john' ? array('mygroup' => 'mygroup') : array();
-    }
-}
+}
\ No newline at end of file
diff --git a/framework/Share/test/Horde/Share/Stub/Group.php b/framework/Share/test/Horde/Share/Stub/Group.php
new file mode 100644 (file)
index 0000000..990ba85
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+class Horde_Group_Test extends Horde_Group {
+    public function __construct()
+    {
+    }
+
+    public function __wakeup()
+    {
+    }
+
+    public function userIsInGroup($user, $gid, $subgroups = true)
+    {
+        return $user == 'john' && $gid == 'mygroup';
+    }
+
+    public function getGroupMemberships($user, $parentGroups = false)
+    {
+        return $user == 'john' ? array('mygroup' => 'mygroup') : array();
+    }
+}