ali-ddns/test/DdnsTest.php

28 lines
522 B
PHP
Raw Normal View History

2022-10-31 08:13:17 +00:00
<?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();
}
}