dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Renamed "Your name" to "Your username" to match with the Media wiki login...
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
HashRingTest.php
diff --git
a/tests/phpunit/includes/HashRingTest.php
b/tests/phpunit/includes/HashRingTest.php
index
2d47fdf
..
68dfea1
100644
(file)
--- a/
tests/phpunit/includes/HashRingTest.php
+++ b/
tests/phpunit/includes/HashRingTest.php
@@
-4,11
+4,14
@@
* @group HashRing
*/
class HashRingTest extends MediaWikiTestCase {
* @group HashRing
*/
class HashRingTest extends MediaWikiTestCase {
- function testHashRing() {
+ /**
+ * @covers HashRing
+ */
+ public function testHashRing() {
$ring = new HashRing( array( 's1' => 1, 's2' => 1, 's3' => 2, 's4' => 2, 's5' => 2, 's6' => 3 ) );
$locations = array();
$ring = new HashRing( array( 's1' => 1, 's2' => 1, 's3' => 2, 's4' => 2, 's5' => 2, 's6' => 3 ) );
$locations = array();
- for ( $i
=0; $i<
20; $i++ ) {
+ for ( $i
= 0; $i <
20; $i++ ) {
$locations[ "hello$i"] = $ring->getLocation( "hello$i" );
}
$expectedLocations = array(
$locations[ "hello$i"] = $ring->getLocation( "hello$i" );
}
$expectedLocations = array(
@@
-37,7
+40,7
@@
class HashRingTest extends MediaWikiTestCase {
$this->assertEquals( $expectedLocations, $locations, 'Items placed at proper locations' );
$locations = array();
$this->assertEquals( $expectedLocations, $locations, 'Items placed at proper locations' );
$locations = array();
- for ( $i
=0; $i<
5; $i++ ) {
+ for ( $i
= 0; $i <
5; $i++ ) {
$locations[ "hello$i"] = $ring->getLocations( "hello$i", 2 );
}
$locations[ "hello$i"] = $ring->getLocations( "hello$i", 2 );
}