File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 12
12
namespace HyperfTest \Database \PgSQL \Stubs ;
13
13
14
14
use Hyperf \Context \ApplicationContext ;
15
+ use Hyperf \Contract \StdoutLoggerInterface ;
15
16
use Hyperf \Database \Connection ;
16
17
use Hyperf \Database \ConnectionResolver ;
17
18
use Hyperf \Database \ConnectionResolverInterface ;
20
21
use Hyperf \Database \PgSQL \PostgreSqlSwooleExtConnection ;
21
22
use Mockery ;
22
23
use Psr \Container \ContainerInterface ;
24
+ use Psr \EventDispatcher \EventDispatcherInterface ;
23
25
24
26
class ContainerStub
25
27
{
26
28
public static function getContainer ()
27
29
{
28
30
$ container = Mockery::mock (ContainerInterface::class);
29
31
$ container ->shouldReceive ('has ' )->andReturn (true );
32
+ $ container ->shouldReceive ('has ' )->with (StdoutLoggerInterface::class)->andReturnFalse ();
33
+ $ container ->shouldReceive ('has ' )->with (EventDispatcherInterface::class)->andReturnFalse ();
30
34
$ container ->shouldReceive ('get ' )->with ('db.connector.pgsql-swoole ' )->andReturn (new PostgresSqlSwooleExtConnector ());
31
35
$ connector = new ConnectionFactory ($ container );
32
36
You can’t perform that action at this time.
0 commit comments