X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fpoolcounter%2FPoolCounterTest.php;h=019e532c930f9f88af31744a28ba690e1abafffa;hb=969ddb49dafd636657701141910be31ff9e2ad8b;hp=2d31d088ee059cbbe8be2943cdc2e19f37f8caac;hpb=74fd9fbb8aa05ec62fc638c05ccc90e331774aea;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/poolcounter/PoolCounterTest.php b/tests/phpunit/includes/poolcounter/PoolCounterTest.php index 2d31d088ee..019e532c93 100644 --- a/tests/phpunit/includes/poolcounter/PoolCounterTest.php +++ b/tests/phpunit/includes/poolcounter/PoolCounterTest.php @@ -1,7 +1,8 @@ getMockBuilder( 'PoolCounterAbstractMock' ) ->setConstructorArgs( array( $poolCounterConfig, 'testCounter', 'someKey' ) ) - // don't mock anything - the proper syntax would be setMethods(null), but due to a PHPUnit bug that - // does not work with getMockForAbstractClass() + // don't mock anything - the proper syntax would be setMethods(null), but due + // to a PHPUnit bug that does not work with getMockForAbstractClass() ->setMethods( array( 'idontexist' ) ) ->getMockForAbstractClass(); $this->assertInstanceOf( 'PoolCounter', $poolCounter ); @@ -44,16 +45,15 @@ class PoolCounterTest extends MediaWikiTestCase { public function testHashKeyIntoSlots() { $poolCounter = $this->getMockBuilder( 'PoolCounterAbstractMock' ) - // don't mock anything - the proper syntax would be setMethods(null), but due to a PHPUnit bug that - // does not work with getMockForAbstractClass() + // don't mock anything - the proper syntax would be setMethods(null), but due + // to a PHPUnit bug that does not work with getMockForAbstractClass() ->setMethods( array( 'idontexist' ) ) ->disableOriginalConstructor() ->getMockForAbstractClass(); - $hashKeyIntoSlots = new ReflectionMethod($poolCounter, 'hashKeyIntoSlots' ); + $hashKeyIntoSlots = new ReflectionMethod( $poolCounter, 'hashKeyIntoSlots' ); $hashKeyIntoSlots->setAccessible( true ); - $keysWithTwoSlots = $keysWithFiveSlots = array(); foreach ( range( 1, 100 ) as $i ) { $keysWithTwoSlots[] = $hashKeyIntoSlots->invoke( $poolCounter, 'key ' . $i, 2 );