mirror of
http://124.126.16.154:8888/singularity/hdk-skeleton.git
synced 2026-01-15 03:55:07 +08:00
@@ -9,6 +9,9 @@ declare(strict_types=1);
|
||||
* @contact group@hyperf.io
|
||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
use Hyperf\Framework\Bootstrap\WorkerStartCallback;
|
||||
use Hyperf\Framework\Bootstrap\PipeMessageCallback;
|
||||
use Hyperf\Framework\Bootstrap\WorkerExitCallback;
|
||||
use Hyperf\Server\Event;
|
||||
use Hyperf\Server\Server;
|
||||
use Swoole\Constant;
|
||||
@@ -40,8 +43,8 @@ return [
|
||||
Constant::OPTION_BUFFER_OUTPUT_SIZE => 2 * 1024 * 1024,
|
||||
],
|
||||
'callbacks' => [
|
||||
Event::ON_WORKER_START => [Hyperf\Framework\Bootstrap\WorkerStartCallback::class, 'onWorkerStart'],
|
||||
Event::ON_PIPE_MESSAGE => [Hyperf\Framework\Bootstrap\PipeMessageCallback::class, 'onPipeMessage'],
|
||||
Event::ON_WORKER_EXIT => [Hyperf\Framework\Bootstrap\WorkerExitCallback::class, 'onWorkerExit'],
|
||||
Event::ON_WORKER_START => [WorkerStartCallback::class, 'onWorkerStart'],
|
||||
Event::ON_PIPE_MESSAGE => [PipeMessageCallback::class, 'onPipeMessage'],
|
||||
Event::ON_WORKER_EXIT => [WorkerExitCallback::class, 'onWorkerExit'],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use function Hyperf\Config\config;
|
||||
use Hyperf\Testing\Client;
|
||||
use Lmc\HttpConstants\Header;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -55,7 +56,7 @@ abstract class HttpTestCase extends TestCase
|
||||
sprintf(
|
||||
'%s:%s',
|
||||
$uid,
|
||||
md5($uid . \Hyperf\Config\config('common.token.basic.salt'))
|
||||
md5($uid . config('common.token.basic.salt'))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Swoole\Runtime;
|
||||
use Hyperf\Di\ClassLoader;
|
||||
use Hyperf\Contract\ApplicationInterface;
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
@@ -18,12 +22,12 @@ date_default_timezone_set('Asia/Shanghai');
|
||||
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
|
||||
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
|
||||
|
||||
Swoole\Runtime::enableCoroutine(true);
|
||||
Runtime::enableCoroutine(true);
|
||||
|
||||
require BASE_PATH . '/vendor/autoload.php';
|
||||
|
||||
Hyperf\Di\ClassLoader::init();
|
||||
ClassLoader::init();
|
||||
|
||||
$container = require BASE_PATH . '/config/container.php';
|
||||
|
||||
$container->get(Hyperf\Contract\ApplicationInterface::class);
|
||||
$container->get(ApplicationInterface::class);
|
||||
|
||||
Reference in New Issue
Block a user