Skip to content

Commit

Permalink
Update tests to match code
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed May 18, 2018
1 parent 804cf4f commit ce1e801
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Shell/RoutesShell.php
Expand Up @@ -65,6 +65,7 @@ public function check($url)
}

unset($route['_matchedRoute']);
ksort($route);

$output = [
['Route name', 'URI template', 'Defaults'],
Expand Down
10 changes: 5 additions & 5 deletions tests/TestCase/Shell/RoutesShellTest.php
Expand Up @@ -65,17 +65,17 @@ public function testMain()
$this->assertOutputContainsRow([
'articles:_action',
'/articles/:action/*',
'{"controller":"Articles","action":"index","plugin":null}'
'{"action":"index","controller":"Articles","plugin":null}'
]);
$this->assertOutputContainsRow([
'bake._controller:_action',
'/bake/:controller/:action',
'{"plugin":"Bake","action":"index"}'
'{"action":"index","plugin":"Bake"}'
]);
$this->assertOutputContainsRow([
'testName',
'/tests/:action/*',
'{"controller":"Tests","action":"index","plugin":null}'
'{"action":"index","controller":"Tests","plugin":null}'
]);
}

Expand All @@ -96,7 +96,7 @@ public function testCheck()
$this->assertOutputContainsRow([
'articles:_action',
'/articles/check',
'{"action":"check","pass":[],"controller":"Articles","plugin":null}'
'{"action":"check","controller":"Articles","pass":[],"plugin":null}'
]);
}

Expand All @@ -117,7 +117,7 @@ public function testCheckWithNamedRoute()
$this->assertOutputContainsRow([
'testName',
'/tests/index',
'{"action":"index","pass":[],"controller":"Tests","plugin":null,"_name":"testName"}'
'{"_name":"testName","action":"index","controller":"Tests","pass":[],"plugin":null}'
]);
}

Expand Down

0 comments on commit ce1e801

Please sign in to comment.