mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 16:15:34 +08:00
change test and PHPDoc
This commit is contained in:
@@ -15,7 +15,6 @@ use ZM\ConnectionManager\ManagerGM;
|
|||||||
use ZM\Console\Console;
|
use ZM\Console\Console;
|
||||||
use ZM\Container\Container;
|
use ZM\Container\Container;
|
||||||
use ZM\Container\ContainerInterface;
|
use ZM\Container\ContainerInterface;
|
||||||
use ZM\Container\EntryResolutionException;
|
|
||||||
use ZM\Context\Context;
|
use ZM\Context\Context;
|
||||||
use ZM\Context\ContextInterface;
|
use ZM\Context\ContextInterface;
|
||||||
use ZM\Event\EventManager;
|
use ZM\Event\EventManager;
|
||||||
@@ -736,8 +735,7 @@ function container(): ContainerInterface
|
|||||||
* 解析类实例(使用容器)
|
* 解析类实例(使用容器)
|
||||||
*
|
*
|
||||||
* @template T
|
* @template T
|
||||||
* @param class-string<T> $abstract
|
* @param class-string<T> $abstract
|
||||||
* @throws EntryResolutionException
|
|
||||||
* @return Closure|mixed|T
|
* @return Closure|mixed|T
|
||||||
*/
|
*/
|
||||||
function resolve(string $abstract, array $parameters = [])
|
function resolve(string $abstract, array $parameters = [])
|
||||||
@@ -750,7 +748,6 @@ function resolve(string $abstract, array $parameters = [])
|
|||||||
*
|
*
|
||||||
* @template T
|
* @template T
|
||||||
* @param null|class-string<T> $abstract
|
* @param null|class-string<T> $abstract
|
||||||
* @throws EntryResolutionException
|
|
||||||
* @return Closure|ContainerInterface|mixed|T
|
* @return Closure|ContainerInterface|mixed|T
|
||||||
*/
|
*/
|
||||||
function app(string $abstract = null, array $parameters = [])
|
function app(string $abstract = null, array $parameters = [])
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class TerminalTest extends TestCase
|
|||||||
{
|
{
|
||||||
Console::setLevel(4);
|
Console::setLevel(4);
|
||||||
Terminal::init();
|
Terminal::init();
|
||||||
$this->assertStringContainsString('Initializing Terminal', $this->getActualOutput());
|
$this->expectOutputRegex('/Initializing\ Terminal/');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,6 +28,6 @@ class TerminalTest extends TestCase
|
|||||||
{
|
{
|
||||||
Console::setLevel(2);
|
Console::setLevel(2);
|
||||||
Terminal::executeCommand('echo zhamao-framework');
|
Terminal::executeCommand('echo zhamao-framework');
|
||||||
$this->assertStringContainsString('zhamao-framework', $this->getActualOutput());
|
$this->expectOutputRegex('/zhamao-framework/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user