Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
fix exception handler binding for manager test
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcht committed Dec 13, 2018
1 parent b8cea62 commit b996e36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/HttpServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ protected function registerDatabaseDriver()
});
}

/**
* Get mereged config for coroutine mysql.
*/
protected function getMergedDatabaseConfig(array $config, string $name)
{
$config['name'] = $name;
Expand All @@ -195,6 +198,9 @@ protected function getMergedDatabaseConfig(array $config, string $name)
return $config;
}

/**
* Get a new mysql connection.
*/
protected function getNewMySqlConnection(array $config)
{
return (new MySqlConnector())->connect($config);
Expand Down
2 changes: 2 additions & 0 deletions tests/Server/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Illuminate\Container\Container;
use SwooleTW\Http\Websocket\Parser;
use SwooleTW\Http\Table\SwooleTable;
use Laravel\Lumen\Exceptions\Handler;
use Swoole\Http\Server as HttpServer;
use Illuminate\Support\Facades\Config;
use SwooleTW\Http\Websocket\Websocket;
Expand Down Expand Up @@ -574,6 +575,7 @@ protected function getContainer($server = null, $config = null)
$container->singleton('swoole.server', function () use ($server) {
return $server;
});
$container->singleton(ExceptionHandler::class, Handler::class);

return $container;
}
Expand Down

0 comments on commit b996e36

Please sign in to comment.