mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
25 lines
459 B
PHP
25 lines
459 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\ZM\Middleware;
|
|
|
|
use Tests\TestCase;
|
|
use ZM\Middleware\Pipeline;
|
|
use ZM\Middleware\TimerMiddleware;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
class PipelineTest extends TestCase
|
|
{
|
|
public function testPipeline()
|
|
{
|
|
$pipe = new Pipeline();
|
|
$a = $pipe->send('APP')
|
|
->through([TimerMiddleware::class])
|
|
->then(fn (string $value) => $value);
|
|
$this->assertEquals('APP', $a);
|
|
}
|
|
}
|