Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for previous commit
  • Loading branch information
rchavik committed May 24, 2017
1 parent 610035c commit 9ae6191
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/TestCase/Routing/RouteBuilderTest.php
Expand Up @@ -350,6 +350,23 @@ public function testNestedPrefix()
$this->assertNull($res);
}

/**
* Test creating sub-scopes with prefix()
*
* @return void
*/
public function testPathWithDotInPrefix()
{
$routes = new RouteBuilder($this->collection, '/admin', ['prefix' => 'admin']);
$res = $routes->prefix('api', function ($r) {
$r->prefix('v10', ['path' => 'v1.0'], function ($r2) {
$this->assertEquals('/admin/api/v1.0', $r2->path());
$this->assertEquals(['prefix' => 'admin/api/v10'], $r2->params());
});
});
$this->assertNull($res);
}

/**
* Test creating sub-scopes with plugin()
*
Expand Down

0 comments on commit 9ae6191

Please sign in to comment.