show() public method

Examples: 1: li3 route show /foo 2: li3 route show post /foo/bar/1 3: li3 route show /test 4: li3 route show /test --env=production Will return outputs similar to: 1: {"controller":"foo","action":"index" } 2: {"controller":"foo","action":"bar","args":["1"]} 3: {"controller":"lithium\\test\\Controller","action":"index"} 4: {"controller":"test","action":"index"}
public show ( ) : void
return void
Example #1
0
 /**
  * Test the show command with http method.
  *
  * This tests a call similar to "li3 route GET /".
  */
 public function testShowWithHttpMethod()
 {
     $request = new Request();
     $request->params = array('args' => array('post', '/'));
     $command = new Route(compact('request') + array('routes' => $this->_config['routes'], 'classes' => array('response' => 'lithium\\tests\\mocks\\console\\MockResponse')));
     $command->show();
     $expected = "{\"controller\":\"Pages\",\"action\":\"view\"}\n";
     $this->assertEqual($expected, $command->response->output);
 }