/** * Tests setMicrotime() fails. * * @test * @expectedException bandwidthThrottle\tokenBucket\storage\StorageException */ public function testSetMicrotimeFails() { $redis = $this->getMock(Redis::class); $redis->expects($this->once())->method("set")->willReturn(false); $storage = new PHPRedisStorage("test", $redis); $storage->setMicrotime(1); }