Skip to content

Commit 0a6f4ae

Browse files
authored
Added event of release connection for hyperf/pool. (#6613)
1 parent e073e89 commit 0a6f4ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/Stubs/ContainerStub.php

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace HyperfTest\Database\PgSQL\Stubs;
1313

1414
use Hyperf\Context\ApplicationContext;
15+
use Hyperf\Contract\StdoutLoggerInterface;
1516
use Hyperf\Database\Connection;
1617
use Hyperf\Database\ConnectionResolver;
1718
use Hyperf\Database\ConnectionResolverInterface;
@@ -20,13 +21,16 @@
2021
use Hyperf\Database\PgSQL\PostgreSqlSwooleExtConnection;
2122
use Mockery;
2223
use Psr\Container\ContainerInterface;
24+
use Psr\EventDispatcher\EventDispatcherInterface;
2325

2426
class ContainerStub
2527
{
2628
public static function getContainer()
2729
{
2830
$container = Mockery::mock(ContainerInterface::class);
2931
$container->shouldReceive('has')->andReturn(true);
32+
$container->shouldReceive('has')->with(StdoutLoggerInterface::class)->andReturnFalse();
33+
$container->shouldReceive('has')->with(EventDispatcherInterface::class)->andReturnFalse();
3034
$container->shouldReceive('get')->with('db.connector.pgsql-swoole')->andReturn(new PostgresSqlSwooleExtConnector());
3135
$connector = new ConnectionFactory($container);
3236

0 commit comments

Comments
 (0)