Skip to content

Commit df511f8

Browse files
authored
Use Hyperf\Coroutine\Coroutine instead of Hyperf\Utils\Coroutine (#5623)
1 parent 88f76d2 commit df511f8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Cases/FormRequestTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
*/
1212
namespace HyperfTest\Validation\Cases;
1313

14+
use Hyperf\Context\ApplicationContext;
1415
use Hyperf\Context\Context;
16+
use Hyperf\Coroutine\Waiter;
1517
use Hyperf\HttpMessage\Server\Response;
1618
use Hyperf\HttpMessage\Upload\UploadedFile;
1719
use Hyperf\Translation\ArrayLoader;
@@ -29,6 +31,8 @@
2931
use Psr\Http\Message\ServerRequestInterface;
3032
use 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

0 commit comments

Comments
 (0)