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 11
11
*/
12
12
namespace HyperfTest \Validation \Cases ;
13
13
14
+ use Hyperf \Context \ApplicationContext ;
14
15
use Hyperf \Context \Context ;
16
+ use Hyperf \Coroutine \Waiter ;
15
17
use Hyperf \HttpMessage \Server \Response ;
16
18
use Hyperf \HttpMessage \Upload \UploadedFile ;
17
19
use Hyperf \Translation \ArrayLoader ;
29
31
use Psr \Http \Message \ServerRequestInterface ;
30
32
use Throwable ;
31
33
34
+ use function Hyperf \Coroutine \wait ;
35
+
32
36
/**
33
37
* @internal
34
38
* @coversNothing
@@ -119,6 +123,8 @@ public function testSceneForFormRequest()
119
123
Context::set (ServerRequestInterface::class, $ psrRequest );
120
124
Context::set (ResponseInterface::class, new Response ());
121
125
$ container = Mockery::mock (ContainerInterface::class);
126
+ $ container ->shouldReceive ('get ' )->with (Waiter::class)->andReturn (new Waiter ());
127
+ ApplicationContext::setContainer ($ container );
122
128
$ translator = new Translator (new ArrayLoader (), 'en ' );
123
129
$ container ->shouldReceive ('get ' )->with (ValidatorFactoryInterface::class)->andReturn (new ValidatorFactory ($ translator ));
124
130
You can’t perform that action at this time.
0 commit comments