Skip to content

Commit

Permalink
Updating test case for Route command.
Browse files Browse the repository at this point in the history
  • Loading branch information
nateabele committed Mar 12, 2011
1 parent 3e9ed1c commit a6ba843
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions libraries/lithium/tests/cases/console/command/RouteTest.php
Expand Up @@ -205,10 +205,9 @@ public function testShowWithInvalidRoute() {
'classes' => array('response' => '\lithium\tests\mocks\console\MockResponse'),
'request' => $request
));

$command->show();

$expected = "No route found\n";
$expected = "No route found.\n";
$this->assertEqual($expected, $command->response->output);
}

Expand All @@ -217,15 +216,12 @@ public function testShowWithInvalidRoute() {
*/
public function testShowWithValidRoute() {
$request = new Request();
$request->params = array(
'args' => array('/')
);
$request->params = array('args' => array('/'));
$command = new Route(array(
'routes_file' => $this->_config['routes_file'],
'classes' => array('response' => '\lithium\tests\mocks\console\MockResponse'),
'request' => $request
));

$command->show();

$expected = "{\"controller\":\"pages\",\"action\":\"view\"}\n";
Expand All @@ -249,7 +245,7 @@ public function testShowWithEnvironment() {

$command->show();

$expected = "No route found\n";
$expected = "No route found.\n";
$this->assertEqual($expected, $command->response->output);
}

Expand Down

0 comments on commit a6ba843

Please sign in to comment.