lithium\tests\cases\console\command\RouteTest::testAllWithEnvironment PHP Method

testAllWithEnvironment() public method

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));
    }