Skip to content

Commit

Permalink
Tests update.
Browse files Browse the repository at this point in the history
  • Loading branch information
andretefras committed Oct 23, 2016
1 parent b6d3426 commit f07504e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/TestCase/Routing/RouteBuilderTest.php
Expand Up @@ -306,7 +306,7 @@ public function testRedirect()
public function testPrefix()
{
$routes = new RouteBuilder($this->collection, '/path', ['key' => 'value']);
$res = $routes->prefix('admin', function ($r) {
$res = $routes->prefix('admin', ['key' => 'value'], function ($r) {
$this->assertInstanceOf('Cake\Routing\RouteBuilder', $r);
$this->assertCount(0, $this->collection->routes());
$this->assertEquals('/path/admin', $r->path());
Expand All @@ -323,9 +323,10 @@ public function testPrefix()
public function testNestedPrefix()
{
$routes = new RouteBuilder($this->collection, '/admin', ['prefix' => 'admin']);
$res = $routes->prefix('api', function ($r) {
$res = $routes->prefix('api', ['_namePrefix' => 'api:'], function ($r) {
$this->assertEquals('/admin/api', $r->path());
$this->assertEquals(['prefix' => 'admin/api'], $r->params());
$this->assertEquals('api:', $r->namePrefix());
});
$this->assertNull($res);
}
Expand Down

0 comments on commit f07504e

Please sign in to comment.