Skip to content
Permalink
Browse files

Tests update.

  • Loading branch information...
andretefras committed Oct 23, 2016
1 parent b6d3426 commit f07504e513a8c742ee75866d138ab4c72807f73f
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/TestCase/Routing/RouteBuilderTest.php
@@ -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());
@@ -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);
}

0 comments on commit f07504e

Please sign in to comment.
You can’t perform that action at this time.