28 lines
522 B
PHP
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();
|
||
|
}
|
||
|
}
|