File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1616use Hyperf \Contract \ConfigInterface ;
1717use Hyperf \Di \Container ;
1818use Hyperf \Pool \Channel ;
19+ use Hyperf \Pool \LowFrequencyInterface ;
1920use Hyperf \Pool \PoolOption ;
21+ use Hyperf \Redis \Frequency ;
2022use Hyperf \Redis \Pool \PoolFactory ;
2123use Hyperf \Redis \Pool \RedisPool ;
2224use 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 ) {
You can’t perform that action at this time.
0 commit comments