Inheritance: extends lithium\console\Command
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);
 }