41 $poolCounter = $this->
getMockBuilder( PoolCounterAbstractMock::class )
44 ->setMethods( [
'idontexist' ] )
45 ->disableOriginalConstructor()
46 ->getMockForAbstractClass();
48 $hashKeyIntoSlots =
new ReflectionMethod( $poolCounter,
'hashKeyIntoSlots' );
49 $hashKeyIntoSlots->setAccessible(
true );
51 $keysWithTwoSlots = $keysWithFiveSlots = [];
52 foreach (
range( 1, 100 ) as $i ) {
53 $keysWithTwoSlots[] = $hashKeyIntoSlots->invoke( $poolCounter,
'test',
'key ' . $i, 2 );
54 $keysWithFiveSlots[] = $hashKeyIntoSlots->invoke( $poolCounter,
'test',
'key ' . $i, 5 );
58 for ( $i = 0; $i <= 1; $i++ ) {
59 $twoSlotKeys[] =
"test:$i";
62 for ( $i = 0; $i <= 4; $i++ ) {
63 $fiveSlotKeys[] =
"test:$i";
71 $hashKeyIntoSlots->invoke( $poolCounter,
'test',
'asdfgh', 1000 ),
72 $hashKeyIntoSlots->invoke( $poolCounter,
'test',
'asdfgh', 1000 )