public function testBootstrapWithInitialTokens($capacity, $tokens) { $rate = new Rate(1, Rate::SECOND); $tokenBucket = new TokenBucket($capacity, $rate, new SingleProcessStorage()); $tokenBucket->bootstrap($tokens); $this->assertTrue($tokenBucket->consume($tokens)); $this->assertFalse($tokenBucket->consume(1)); }