Skip to content
Permalink
Browse files

Added test for custom redirect route class

  • Loading branch information...
jeremyharris committed Sep 21, 2017
1 parent 61343cc commit dbdaae8a7b209f875356a1a13c431fb2c9455588
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/TestCase/Routing/RouteBuilderTest.php
@@ -326,6 +326,21 @@ public function testRedirect()
$this->assertEquals('/forums', $route->redirect[0]);
}
/**
* Test using a custom route class for redirect routes.
*
* @return void
*/
public function testRedirectWithCustomRouteClass()
{
$routes = new RouteBuilder($this->collection, '/');
$routes->redirect('/old', '/forums', ['status' => 301, 'routeClass' => 'InflectedRoute']);
$route = $this->collection->routes()[0];
$this->assertInstanceOf(InflectedRoute::class, $route);
}
/**
* Test creating sub-scopes with prefix()
*

0 comments on commit dbdaae8

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