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

setUp() public method

Create a temporary routes.php file for testing and reset the router.
public setUp ( )
    public function setUp()
    {
        $this->_config['routes'] = "{$this->_testPath}/routes.php";
        $testParams = 'array("controller" => "lithium\\test\\Controller")';
        $content = array('<?php', 'use lithium\\net\\http\\Router;', 'use lithium\\core\\Environment;', 'Router::connect("/", "Pages::view");', 'Router::connect("/pages/{:args}", "Pages::view");', 'if (!Environment::is("production")) {', '	Router::connect("/test/{:args}", ' . $testParams . ');', '	Router::connect("/test", ' . $testParams . ');', '}', '?>');
        file_put_contents($this->_config['routes'], join("\n", $content));
    }