ali-ddns/test/DdnsTest.php
2022-10-31 16:13:17 +08:00

28 lines
522 B
PHP

<?php
namespace Zyimm\Ddns\Test;
use Hyperf\Nano\Factory\AppFactory;
use PHPUnit\Framework\TestCase;
class DdnsTest extends TestCase
{
public function test()
{
$app = AppFactory::create();
$app->get('/', function () {
$user = $this->request->input('user', 'nano');
$method = $this->request->getMethod();
return [
'message' => "hello {$user}",
'method' => $method,
];
});
$app->run();
}
}