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