From: Gunnar Wrobel
Date: Thu, 13 Jan 2011 15:24:11 +0000 (+0100) Subject: Put the stub into a separate "Stub" directory as it is useful even if not extending... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=48a4c391aa849102cbdd804d95bb74b4869545eb;p=horde.git Put the stub into a separate "Stub" directory as it is useful even if not extending from the Base test in this directory. --- diff --git a/framework/Share/test/Horde/Share/Autoload.php b/framework/Share/test/Horde/Share/Autoload.php index 3a933ce37..bccaf5ffa 100644 --- a/framework/Share/test/Horde/Share/Autoload.php +++ b/framework/Share/test/Horde/Share/Autoload.php @@ -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'; diff --git a/framework/Share/test/Horde/Share/Base.php b/framework/Share/test/Horde/Share/Base.php index 77a029d5c..6abd47eee 100644 --- a/framework/Share/test/Horde/Share/Base.php +++ b/framework/Share/test/Horde/Share/Base.php @@ -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 index 000000000..990ba85b3 --- /dev/null +++ b/framework/Share/test/Horde/Share/Stub/Group.php @@ -0,0 +1,21 @@ + 'mygroup') : array(); + } +}