Fix yii server and add tests.

This commit is contained in:
Wilmer Arambula
2023-10-20 10:45:21 -03:00
parent 04f59442d9
commit 70a7282fec
3 changed files with 111 additions and 1 deletions

View File

@ -80,7 +80,13 @@ class ServeController extends Controller
}
$this->stdout("Quit the server with CTRL-C or COMMAND-C.\n");
passthru('"' . PHP_BINARY . '"' . " -S {$address} -t \"{$documentRoot}\" \"$router\"");
$command = '"' . PHP_BINARY . '"' . " -S {$address} -t \"{$documentRoot}\"";
if ($this->router !== null && $router !== '') {
$command .= " -r \"{$router}\"";
}
passthru($command);
}
/**