Example #1
0
 public function testExperimentalShell()
 {
     $router = new Router();
     $router->install('/**', function () {
         return 'Installed ' . implode(', ', func_get_arg(0));
     });
     $commandLine = 'install apache php mysql';
     $commandArgs = explode(' ', $commandLine);
     $output = $router->dispatch(array_shift($commandArgs), '/' . implode('/', $commandArgs))->response();
     $this->assertEquals('Installed apache, php, mysql', $output);
 }