From 5d141fadc76cde557fad109b3e8052b7a304a14a Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 23 Jan 2011 13:25:33 -0500 Subject: [PATCH] Add test to ensure listShares results are keyed by name --- framework/Share/test/Horde/Share/Base.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/Share/test/Horde/Share/Base.php b/framework/Share/test/Horde/Share/Base.php index 1e184710b..3380a2e4f 100644 --- a/framework/Share/test/Horde/Share/Base.php +++ b/framework/Share/test/Horde/Share/Base.php @@ -254,7 +254,10 @@ class Horde_Share_Test_Base extends Horde_Test_Case $this->assertEquals($shares, self::$share->listShares('john', array('perm' => Horde_Perms::SHOW, 'attributes' => null, 'from' => 0, 'count' => 0, 'sort_by' => null, 'direction' => 0))); // Getting back the correct shares? - $shares = array_values(self::$share->listShares('john', array('all_levels' => false, 'sort_by' => 'id'))); + $shares = self::$share->listShares('john', array('all_levels' => false, 'sort_by' => 'id')); + // Keyed by name, and not id? + $this->assertEquals('myshare', current(array_keys($shares))); + $shares = array_values($shares); $this->assertEquals($shareids[0], $shares[0]->getId()); $this->assertEquals($shareids[1], $shares[2]->getId()); $this->assertEquals($shareids[2], $shares[3]->getId()); -- 2.11.0