protected function createApp($callback = null) { $app = new Application(['root' => '.', 'services' => ['log' => $this->createLogger($this->logFile)]]); if ($callback) { $app->route('GET', '/', $callback); } $app->bootstrap(); return $app; }
protected function createApplication() { $application = new Application(['root' => '.']); $application->route('GET', '/', function () { return 'hello'; })->route('GET', '/{a}/plus/{b}', function ($a, $b, Request $request) { return $a + $b; })->route('GET', '/{a}/multi/{b}', 'blink\\tests\\http\\TestController@compute')->bootstrap(); return $application; }