Skip to content

Commit

Permalink
修复测试
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 31, 2023
1 parent 7abe176 commit 93b56c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Swoole 队列消费进程.
*/
#[Process(name: 'QueueConsumer', unique: true, co: fasle)]
#[Process(name: 'QueueConsumer', unique: true, co: false)]
class SwooleQueueConsumerProcess extends BaseProcess
{
#[Inject(name: 'imiQueue')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Imi\Server\Http\Route\Annotation\Action;
use Imi\Server\Http\Route\Annotation\Controller;
use Imi\Server\Http\Route\Annotation\Route;
use Imi\Server\View\Annotation\HtmlView;
use Imi\Server\View\Annotation\View;

#[Controller(prefix: '/')]
Expand All @@ -18,7 +19,8 @@ class IndexController extends HttpController
*/
#[Action]
#[Route(url: '/')]
#[View(renderType: 'html', template: 'index')]
#[View(renderType: 'html')]
#[HtmlView(template: 'index')]
public function index()
{
$datetime = date('Y-m-d H:i:s');
Expand All @@ -32,7 +34,8 @@ public function index()
* @return mixed
*/
#[Action]
#[View(renderType: 'html', template: 'test')]
#[View(renderType: 'html')]
#[HtmlView(template: 'test')]
public function test()
{
return [
Expand Down
2 changes: 1 addition & 1 deletion src/Validate/Annotation/Scene.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @property string $name 场景名称
* @property array $fields 需要验证的字段名列表
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
class Scene extends Base
{
public function __construct(?array $__data = null, string $name = '', array $fields = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Component/Inject/Classes/TestArg.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TestArg
* @param string $phpVersion
*/
#[FilterArg(name: 'id', filter: 'intval')]
#[InjectArg(name: 'phpVersion', value: '8.1.24')]
#[InjectArg(name: 'phpVersion', value: \PHP_VERSION)]
public function test($id, $phpVersion = null): void
{
Assert::assertTrue(\is_int($id));
Expand Down

0 comments on commit 93b56c8

Please sign in to comment.