}
public function testExpiration() {
- $cache = $this->getMock( HashBagOStuff::class, [ 'add' ] );
+ $cache = $this->getMockBuilder( HashBagOStuff::class )
+ ->setMethods( [ 'add' ] )->getMock();
$throttler = new Throttler( [ [ 'count' => 3, 'seconds' => 10 ] ], [ 'cache' => $cache ] );
$throttler->setLogger( new NullLogger() );
->setMethods( [ 'log' ] )
->getMockForAbstractClass();
$logger->expects( $this->once() )->method( 'log' )->with( $this->anything(), $this->anything(), [
- 'type' => 'custom',
+ 'throttle' => 'custom',
'index' => 0,
'ip' => '1.2.3.4',
'username' => 'SomeUser',