fix validation tests

This commit is contained in:
Reasno 2020-04-26 14:44:04 +08:00
parent 4ece5af25a
commit ff8ce8d6b3

View File

@ -13,6 +13,7 @@ namespace HyperfTest\Validation\Cases;
use Hyperf\Contract\NormalizerInterface;
use Hyperf\Contract\ValidatorInterface;
use Hyperf\Di\ClosureDefinitionCollectorInterface;
use Hyperf\Di\Container;
use Hyperf\Di\MethodDefinitionCollector;
use Hyperf\Di\MethodDefinitionCollectorInterface;
@ -134,7 +135,8 @@ class ValidationMiddlewareTest extends TestCase
->andReturn(new DemoRequest($container));
$container->shouldReceive('has')->with(DemoRequest::class)
->andReturn(true);
$container->shouldReceive('has')->with(ClosureDefinitionCollectorInterface::class)
->andReturn(false);
ApplicationContext::setContainer($container);
return $container;