File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1111 */
1212namespace HyperfTest \Validation \Cases ;
1313
14+ use Hyperf \Context \ApplicationContext ;
1415use Hyperf \Context \Context ;
16+ use Hyperf \Coroutine \Waiter ;
1517use Hyperf \HttpMessage \Server \Response ;
1618use Hyperf \HttpMessage \Upload \UploadedFile ;
1719use Hyperf \Translation \ArrayLoader ;
2931use Psr \Http \Message \ServerRequestInterface ;
3032use Throwable ;
3133
34+ use function Hyperf \Coroutine \wait ;
35+
3236/**
3337 * @internal
3438 * @coversNothing
@@ -119,6 +123,8 @@ public function testSceneForFormRequest()
119123 Context::set (ServerRequestInterface::class, $ psrRequest );
120124 Context::set (ResponseInterface::class, new Response ());
121125 $ container = Mockery::mock (ContainerInterface::class);
126+ $ container ->shouldReceive ('get ' )->with (Waiter::class)->andReturn (new Waiter ());
127+ ApplicationContext::setContainer ($ container );
122128 $ translator = new Translator (new ArrayLoader (), 'en ' );
123129 $ container ->shouldReceive ('get ' )->with (ValidatorFactoryInterface::class)->andReturn (new ValidatorFactory ($ translator ));
124130
You can’t perform that action at this time.
0 commit comments