all() public method

Example: sh li3 route li3 route all Will return an output similar to: Template Params -------- ------ {"controller":"pages","action":"view"} pages/{:args} {"controller":"pages","action":"view"} {:slug:[\w\-]+} {"controller":"posts","action":"show"} {:controller}/{:action}/{:args} {"action":"index"}
public all ( $scope = true ) : void
return void
Ejemplo n.º 1
0
 /**
  * Tests the "all" command with an env (production) param.
  *
  * Don't be confused if the expected output doesn't make sense here. We are
  * stripping the whitespace away so that this source code is easier to read.
  * Built-In methods are used for output formatting and are tested elsewhere.
  */
 public function testAllWithEnvironment()
 {
     $request = new Request();
     $request->params = array('env' => 'production');
     $command = new Route(compact('request') + array('routes' => $this->_config['routes'], 'classes' => array('response' => 'lithium\\tests\\mocks\\console\\MockResponse')));
     $command->all();
     $expected = 'TemplateParams--------------';
     $expected .= '/{"controller":"Pages","action":"view"}';
     $expected .= '/pages/{:args}{"controller":"Pages","action":"view"}';
     $this->assertEqual($this->_strip($expected), $this->_strip($command->response->output));
 }