Skip to content

Commit 6043083

Browse files
committed
Update RedisProxyTest.php
1 parent 33a9c96 commit 6043083

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/RedisProxyTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
use Hyperf\Contract\ConfigInterface;
1717
use Hyperf\Di\Container;
1818
use Hyperf\Pool\Channel;
19+
use Hyperf\Pool\LowFrequencyInterface;
1920
use Hyperf\Pool\PoolOption;
21+
use Hyperf\Redis\Frequency;
2022
use Hyperf\Redis\Pool\PoolFactory;
2123
use Hyperf\Redis\Pool\RedisPool;
2224
use Hyperf\Redis\Redis;
@@ -90,6 +92,9 @@ private function getRedis($optinos = [])
9092
],
9193
]));
9294
$pool = new RedisPool($container, 'default');
95+
$frequency = Mockery::mock(LowFrequencyInterface::class);
96+
$frequency->shouldReceive('isLowFrequency')->andReturn(false);
97+
$container->shouldReceive('make')->with(Frequency::class, Mockery::any())->andReturn($frequency);
9398
$container->shouldReceive('make')->with(RedisPool::class, ['name' => 'default'])->andReturn($pool);
9499
$container->shouldReceive('make')->with(Channel::class, ['size' => 30])->andReturn(new Channel(30));
95100
$container->shouldReceive('make')->with(PoolOption::class, Mockery::any())->andReturnUsing(function ($class, $args) {

0 commit comments

Comments
 (0)