bandwidthThrottle\tokenBucket\storage\PredisStorageTest::testBrokenCommunication PHP Метод

testBrokenCommunication() публичный Метод

Tests broken server communication.
public testBrokenCommunication ( callable $method )
$method callable The tested method.
    public function testBrokenCommunication(callable $method)
    {
        $redis = $this->createMock(Client::class);
        $redis->expects($this->once())->method("__call")->willThrowException(new ClientException());
        $storage = new PredisStorage("test", $redis);
        call_user_func($method, $storage);
    }