<email>chuck@horde.org</email>
<active>yes</active>
</lead>
- <date>2010-07-10</date>
- <time>10:39:15</time>
+ <date>2010-12-16</date>
+ <time>14:31:38</time>
<version>
<release>0.2.0</release>
<api>0.1.0</api>
<api>beta</api>
</stability>
<license uri="http://opensource.org/licenses/bsd-license.php">BSD</license>
- <notes>* Add Horde_Support_Randomid::.
+ <notes>
+* Add Horde_Support_Randomid::.
* Add Portuguese numerizer.
</notes>
<contents>
</dir> <!-- /test/Horde/Support/Numerizer -->
<file name="AllTests.php" role="test" />
<file name="ArrayTest.php" role="test" />
+ <file name="Autoload.php" role="test" />
<file name="BacktraceTest.php" role="test" />
<file name="CombineStreamTest.php" role="test" />
<file name="ConsistentHashTest.php" role="test" />
<install as="Horde/Support/Numerizer/Locale/Pt.php" name="lib/Horde/Support/Numerizer/Locale/Pt.php" />
<install as="Horde/Support/AllTests.php" name="test/Horde/Support/AllTests.php" />
<install as="Horde/Support/ArrayTest.php" name="test/Horde/Support/ArrayTest.php" />
+ <install as="Horde/Support/Autoload.php" name="test/Horde/Support/Autoload.php" />
<install as="Horde/Support/BacktraceTest.php" name="test/Horde/Support/BacktraceTest.php" />
<install as="Horde/Support/CombineStreamTest.php" name="test/Horde/Support/CombineStreamTest.php" />
<install as="Horde/Support/ConsistentHashTest.php" name="test/Horde/Support/ConsistentHashTest.php" />
* Initial Horde_Support_Numerizer objects
</notes>
</release>
+ <release>
+ <version>
+ <release>0.2.0</release>
+ <api>0.1.0</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2010-12-16</date>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD</license>
+ <notes>
+* Add Horde_Support_Randomid::.
+ * Add Portuguese numerizer.
+ </notes>
+ </release>
</changelog>
</package>
--- /dev/null
+<?php
+/**
+ * Setup autoloading for the tests.
+ *
+ * Copyright 2009-2010 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 Horde
+ * @package Support
+ * @subpackage UnitTests
+ * @copyright 2008-2010 The Horde Project (http://www.horde.org/)
+ * @license http://opensource.org/licenses/bsd-license.php
+ */
+
+require_once 'Horde/Test/Autoload.php';
+
+/** Catch strict standards */
+error_reporting(E_ALL | E_STRICT);
* @category Horde
* @package Support
* @subpackage UnitTests
- * @copyright 2008-2009 The Horde Project (http://www.horde.org/)
+ * @copyright 2008-2010 The Horde Project (http://www.horde.org/)
* @license http://opensource.org/licenses/bsd-license.php
*/
/**
- * @group support
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/Autoload.php';
+
+/**
* @category Horde
* @package Support
* @subpackage UnitTests
- * @copyright 2008-2009 The Horde Project (http://www.horde.org/)
+ * @copyright 2008-2010 The Horde Project (http://www.horde.org/)
* @license http://opensource.org/licenses/bsd-license.php
*/
class Horde_Support_ConsistentHashTest extends PHPUnit_Framework_TestCase
// Remove the fixed test value.
$nodes = array_values($nodes);
$testindex = array_search('key', $nodes);
- $tmp = array_splice($nodes, $testindex, 1);
- $testvalue = array_shift($tmp);
+ array_splice($nodes, $testindex, 1);
foreach ($nodes as $node) {
$h->add($node);
$this->assertEquals(
$expected,
- $h->getNodes($testvalue, 10));
+ $h->getNodes('key', 10));
}
public function testFallbackWhenANodeIsRemoved()
// Remove the fixed test value.
$nodes = array_values($nodes);
$testindex = array_search('key', $nodes);
- $tmp = array_splice($nodes, $testindex, 1);
- $testvalue = array_shift($tmp);
+ array_splice($nodes, $testindex, 1);
foreach ($nodes as $node) {
$h->add($node);